Socket
Socket
Sign inDemoInstall

@financial-times/o-typography

Package Overview
Dependencies
Maintainers
18
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@financial-times/o-typography - npm Package Compare versions

Comparing version 6.4.2 to 6.4.3

2

package.json

@@ -28,3 +28,3 @@ {

"name": "@financial-times/o-typography",
"version": "6.4.2",
"version": "6.4.3",
"dependencies": {

@@ -31,0 +31,0 @@ "@financial-times/o-colors": "^5.0.0",

@@ -430,4 +430,13 @@ # o-typography [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](#licence)

With `oTypographyCustomize` you can change the size of heading levels and update the colour of `o-typography`'s blockquote. In the below example, we update the size of `h1` and `h2` headings, and change the blockquote colour to `hotpink`. For a full list of brand variables which may be customised, see the [oTypographyCustomize SassDoc](https://registry.origami.ft.com/components/o-typography/sassdoc?brand=whitelabel#mixin-oTypographyCustomize).
Currently `oTypographyCustomize` can only update heading styles of whitelabel brand projects (_please contact Origami to request more options_). `oTypographyCustomize` accepts a map of configuration where each key is a heading level (one-six) `heading-level-[level]` to a map of heading scales and weights:
- `weight`: The heading weight (e.g. `semibold`)
- `scale`: The default heading scale, used when no other scales are set (e.g. 5)
- `scale-s`: The heading scale for [small viewports](https://registry.origami.ft.com/components/o-grid/readme?brand=master#layout-sizes) and above.
- `scale-m`: The heading scale for [medium viewports](https://registry.origami.ft.com/components/o-grid/readme?brand=master#layout-sizes) and above.
- `scale-l`: The heading scale for [large viewports](https://registry.origami.ft.com/components/o-grid/readme?brand=master#layout-sizes) and above.
- `scale-xl`: The heading scale for [extra-large viewports](https://registry.origami.ft.com/components/o-grid/readme?brand=master#layout-sizes) and above.
In the below example, we update the size and weight of h1 and h2 headings:
```scss

@@ -445,5 +454,6 @@ $o-brand: whitelabel;

@include oTypographyCustomize((
'blockquote-color': hotpink, // Update the blockquote border color to hotpink.
'heading-level-one': (
'scale': 7, // Update the size of h1.
'scale': 5, // Update the size of h1.
'scale-s': 7, // Increase the size of h1 on small devices and above.
'weight': 'semibold' // Update the weight of the h1.
),

@@ -465,2 +475,4 @@ 'heading-level-two': (

_For more details is the [oTypographyCustomize SassDoc](https://registry.origami.ft.com/components/o-typography/sassdoc?brand=whitelabel#mixin-oTypographyCustomize)._
## JavaScript

@@ -467,0 +479,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc