This repository was archived by the owner on Jun 14, 2022. It is now read-only.
Repository navigation
Releases
Releases · guardian/guss-typography
Update readme
Remove browser font reset
The default rem size is no longer set to 10px and the body then reset back to 16px.
From now on, we now assume we know nothing about the default font sizes and they're left alone.
v3.0.0 - SassDoc, better configuration and helpers
SassDoc
Inline documentation uses SassDoc notation, to do things like this:
Configuration
Configuration is consolidated into a single map, easy to extend and simpler to query:
$font-scale: (
header: (
1: (font-size: 16, line-height: 20),
2: (font-size: 18, line-height: 24),
3: (font-size: 20, line-height: 24),
4: (font-size: 22, line-height: 28),
5: (font-size: 24, line-height: 28),
),
headline: (
1: (font-size: 14, line-height: 18),
2: (font-size: 16, line-height: 20),
3: (font-size: 20, line-height: 24),
4: (font-size: 24, line-height: 28),
5: (font-size: 28, line-height: 32),
6: (font-size: 32, line-height: 36),
7: (font-size: 36, line-height: 40),
8: (font-size: 40, line-height: 44),
9: (font-size: 44, line-height: 48),
),
bodyHeading: (
1: (font-size: 14, line-height: 22),
2: (font-size: 16, line-height: 24),
3: (font-size: 18, line-height: 28),
4: (font-size: 20, line-height: 28),
),
bodyCopy: (
1: (font-size: 14, line-height: 20),
2: (font-size: 16, line-height: 24),
3: (font-size: 18, line-height: 28),
),
data: (
1: (font-size: 11, line-height: 14),
2: (font-size: 12, line-height: 14),
3: (font-size: 13, line-height: 16),
4: (font-size: 14, line-height: 18),
5: (font-size: 16, line-height: 20),
6: (font-size: 18, line-height: 22),
),
textSans: (
1: (font-size: 12, line-height: 16),
2: (font-size: 13, line-height: 18),
3: (font-size: 14, line-height: 20),
4: (font-size: 14, line-height: 22),
)
);Helpers
Ubiquity between configuration, the png matrix and the helper parameter syntax.
get-font-size and get-line-height helpers take these two parameters:
@param {String} $name - Name of the font-scale in the matrix (eg: headline)
@param {Number} $level - Level in the matrixThey should be called like this:
.get-font-size {
font-size: get-font-size(headline, 6); // used to be ($fs-headlines, 6)
}
.get-line-height {
line-height: get-line-height(header, 3); // used to be ($fs-headers, 3)
}v2.1.1 - force pixel values in font-size mixin
Fixes a bug where @include font-size(14, 18) would output unitless values: font-size: 14; line-height: 18;
v2.1.0 - output values in pixel units only
- Removes guss-rem dependency
- Outputs values in px units instead of rem + px fallback
v2.0.2
v2.0.1
v2.0.0 - Use correct font names
- [new] Normalise variable and mixins names
$sans-serif→$f-data$serif→$f-serif-text$serifheadline→$f-serif-headline$text-sans→$f-sans-serif-text$headline-sans→$f-sans-serif-headlinef-textsans()→f-textSans()fs-textsans()→fs-textSans()
- [new] Use the real font names:
- AgateSans → Guardian Agate Sans 1 Web
- EgyptianText → Guardian Text Egyptian Web
- EgyptianHeadline → Guardian Egyptian Web
- TextSans → Guardian Text Sans Web
- HeadlineSans → Guardian Sans Web
- [new] Add 14/18 size to the Headline scale
- [new] Remove 14/22 size from the Body Copy scale
- [new]
guss-typography-defaultsmixin - [new] Re-architect in multiple partials
- [new] Font scale documentation in HTML
v1.4.0 - Font smoothing is at the product's discretion
- [new] Let font smoothing method at the product's discretion
- [new] Documentation suggests a default global font setting
v1.3.0 - Headline Sans & Better Docs
- [new]
headline-sansfont, with associatedf-headlineSansmixin - [update] Better documentation
