Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export typography presets as CSS #1270

Merged
merged 11 commits into from
Mar 11, 2024
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ Project-specific are defined in their `project.json`, and can be run with `make

- `make @guardian/source-foundations:build`
- `make @guardian/source-foundations:build-storybook`
- `make @guardian/source-foundations:build-type-presets`
- `make @guardian/source-foundations:dev`
- `make @guardian/source-foundations:fix`
- `make @guardian/source-foundations:lint`
Expand Down
42 changes: 21 additions & 21 deletions libs/@guardian/design-tokens/src/tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -1372,7 +1372,7 @@
"textSans14": {
"$value": {
"fontFamily": "{typography.fontFamily.textSans}",
"fontSize": "{typography.fontSize.12}",
"fontSize": "{typography.fontSize.14}",
"lineHeight": "{typography.lineHeight.regular}",
"fontWeight": "{typography.fontWeight.regular}",
"fontStyle": "normal"
Expand All @@ -1381,7 +1381,7 @@
"textSans15": {
"$value": {
"fontFamily": "{typography.fontFamily.textSans}",
"fontSize": "{typography.fontSize.12}",
"fontSize": "{typography.fontSize.15}",
"lineHeight": "{typography.lineHeight.regular}",
"fontWeight": "{typography.fontWeight.regular}",
"fontStyle": "normal"
Expand All @@ -1390,7 +1390,7 @@
"textSans17": {
"$value": {
"fontFamily": "{typography.fontFamily.textSans}",
"fontSize": "{typography.fontSize.12}",
"fontSize": "{typography.fontSize.17}",
"lineHeight": "{typography.lineHeight.regular}",
"fontWeight": "{typography.fontWeight.regular}",
"fontStyle": "normal"
Expand All @@ -1399,7 +1399,7 @@
"textSans20": {
"$value": {
"fontFamily": "{typography.fontFamily.textSans}",
"fontSize": "{typography.fontSize.12}",
"fontSize": "{typography.fontSize.20}",
"lineHeight": "{typography.lineHeight.regular}",
"fontWeight": "{typography.fontWeight.regular}",
"fontStyle": "normal"
Expand All @@ -1408,7 +1408,7 @@
"textSans24": {
"$value": {
"fontFamily": "{typography.fontFamily.textSans}",
"fontSize": "{typography.fontSize.12}",
"fontSize": "{typography.fontSize.24}",
"lineHeight": "{typography.lineHeight.regular}",
"fontWeight": "{typography.fontWeight.regular}",
"fontStyle": "normal"
Expand All @@ -1417,7 +1417,7 @@
"textSans28": {
"$value": {
"fontFamily": "{typography.fontFamily.textSans}",
"fontSize": "{typography.fontSize.12}",
"fontSize": "{typography.fontSize.28}",
"lineHeight": "{typography.lineHeight.regular}",
"fontWeight": "{typography.fontWeight.regular}",
"fontStyle": "normal"
Expand All @@ -1426,7 +1426,7 @@
"textSans34": {
"$value": {
"fontFamily": "{typography.fontFamily.textSans}",
"fontSize": "{typography.fontSize.12}",
"fontSize": "{typography.fontSize.34}",
"lineHeight": "{typography.lineHeight.regular}",
"fontWeight": "{typography.fontWeight.regular}",
"fontStyle": "normal"
Expand All @@ -1444,7 +1444,7 @@
"textSansBold14": {
"$value": {
"fontFamily": "{typography.fontFamily.textSans}",
"fontSize": "{typography.fontSize.12}",
"fontSize": "{typography.fontSize.14}",
"lineHeight": "{typography.lineHeight.regular}",
"fontWeight": "{typography.fontWeight.bold}",
"fontStyle": "normal"
Expand All @@ -1453,7 +1453,7 @@
"textSansBold15": {
"$value": {
"fontFamily": "{typography.fontFamily.textSans}",
"fontSize": "{typography.fontSize.12}",
"fontSize": "{typography.fontSize.15}",
"lineHeight": "{typography.lineHeight.regular}",
"fontWeight": "{typography.fontWeight.bold}",
"fontStyle": "normal"
Expand All @@ -1462,7 +1462,7 @@
"textSansBold17": {
"$value": {
"fontFamily": "{typography.fontFamily.textSans}",
"fontSize": "{typography.fontSize.12}",
"fontSize": "{typography.fontSize.17}",
"lineHeight": "{typography.lineHeight.regular}",
"fontWeight": "{typography.fontWeight.bold}",
"fontStyle": "normal"
Expand All @@ -1471,7 +1471,7 @@
"textSansBold20": {
"$value": {
"fontFamily": "{typography.fontFamily.textSans}",
"fontSize": "{typography.fontSize.12}",
"fontSize": "{typography.fontSize.20}",
"lineHeight": "{typography.lineHeight.regular}",
"fontWeight": "{typography.fontWeight.bold}",
"fontStyle": "normal"
Expand All @@ -1480,7 +1480,7 @@
"textSansBold24": {
"$value": {
"fontFamily": "{typography.fontFamily.textSans}",
"fontSize": "{typography.fontSize.12}",
"fontSize": "{typography.fontSize.24}",
"lineHeight": "{typography.lineHeight.regular}",
"fontWeight": "{typography.fontWeight.bold}",
"fontStyle": "normal"
Expand All @@ -1489,7 +1489,7 @@
"textSansBold28": {
"$value": {
"fontFamily": "{typography.fontFamily.textSans}",
"fontSize": "{typography.fontSize.12}",
"fontSize": "{typography.fontSize.28}",
"lineHeight": "{typography.lineHeight.regular}",
"fontWeight": "{typography.fontWeight.bold}",
"fontStyle": "normal"
Expand All @@ -1498,7 +1498,7 @@
"textSansBold34": {
"$value": {
"fontFamily": "{typography.fontFamily.textSans}",
"fontSize": "{typography.fontSize.12}",
"fontSize": "{typography.fontSize.34}",
"lineHeight": "{typography.lineHeight.regular}",
"fontWeight": "{typography.fontWeight.bold}",
"fontStyle": "normal"
Expand All @@ -1516,7 +1516,7 @@
"textSansItalic14": {
"$value": {
"fontFamily": "{typography.fontFamily.textSans}",
"fontSize": "{typography.fontSize.12}",
"fontSize": "{typography.fontSize.14}",
"lineHeight": "{typography.lineHeight.regular}",
"fontWeight": "{typography.fontWeight.regular}",
"fontStyle": "Italic"
Expand All @@ -1525,7 +1525,7 @@
"textSansItalic15": {
"$value": {
"fontFamily": "{typography.fontFamily.textSans}",
"fontSize": "{typography.fontSize.12}",
"fontSize": "{typography.fontSize.15}",
"lineHeight": "{typography.lineHeight.regular}",
"fontWeight": "{typography.fontWeight.regular}",
"fontStyle": "italic"
Expand All @@ -1534,7 +1534,7 @@
"textSansItalic17": {
"$value": {
"fontFamily": "{typography.fontFamily.textSans}",
"fontSize": "{typography.fontSize.12}",
"fontSize": "{typography.fontSize.17}",
"lineHeight": "{typography.lineHeight.regular}",
"fontWeight": "{typography.fontWeight.regular}",
"fontStyle": "italic"
Expand All @@ -1543,7 +1543,7 @@
"textSansItalic20": {
"$value": {
"fontFamily": "{typography.fontFamily.textSans}",
"fontSize": "{typography.fontSize.12}",
"fontSize": "{typography.fontSize.20}",
"lineHeight": "{typography.lineHeight.regular}",
"fontWeight": "{typography.fontWeight.regular}",
"fontStyle": "italic"
Expand All @@ -1552,7 +1552,7 @@
"textSansItalic24": {
"$value": {
"fontFamily": "{typography.fontFamily.textSans}",
"fontSize": "{typography.fontSize.12}",
"fontSize": "{typography.fontSize.24}",
"lineHeight": "{typography.lineHeight.regular}",
"fontWeight": "{typography.fontWeight.regular}",
"fontStyle": "italic"
Expand All @@ -1561,7 +1561,7 @@
"textSansItalic28": {
"$value": {
"fontFamily": "{typography.fontFamily.textSans}",
"fontSize": "{typography.fontSize.12}",
"fontSize": "{typography.fontSize.28}",
"lineHeight": "{typography.lineHeight.regular}",
"fontWeight": "{typography.fontWeight.regular}",
"fontStyle": "italic"
Expand All @@ -1570,7 +1570,7 @@
"textSansItalic34": {
"$value": {
"fontFamily": "{typography.fontFamily.textSans}",
"fontSize": "{typography.fontSize.12}",
"fontSize": "{typography.fontSize.34}",
"lineHeight": "{typography.lineHeight.regular}",
"fontWeight": "{typography.fontWeight.regular}",
"fontStyle": "italic"
Expand Down
42 changes: 21 additions & 21 deletions libs/@guardian/design-tokens/tokens.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ export declare const tokens: {
'Lucida Grande',
'sans-serif',
];
readonly fontSize: '12px';
readonly fontSize: '14px';
readonly lineHeight: 1.3;
readonly fontWeight: 400;
readonly fontStyle: 'normal';
Expand All @@ -1216,7 +1216,7 @@ export declare const tokens: {
'Lucida Grande',
'sans-serif',
];
readonly fontSize: '12px';
readonly fontSize: '15px';
readonly lineHeight: 1.3;
readonly fontWeight: 400;
readonly fontStyle: 'normal';
Expand All @@ -1231,7 +1231,7 @@ export declare const tokens: {
'Lucida Grande',
'sans-serif',
];
readonly fontSize: '12px';
readonly fontSize: '17px';
readonly lineHeight: 1.3;
readonly fontWeight: 400;
readonly fontStyle: 'normal';
Expand All @@ -1246,7 +1246,7 @@ export declare const tokens: {
'Lucida Grande',
'sans-serif',
];
readonly fontSize: '12px';
readonly fontSize: '20px';
readonly lineHeight: 1.3;
readonly fontWeight: 400;
readonly fontStyle: 'normal';
Expand All @@ -1261,7 +1261,7 @@ export declare const tokens: {
'Lucida Grande',
'sans-serif',
];
readonly fontSize: '12px';
readonly fontSize: '24px';
readonly lineHeight: 1.3;
readonly fontWeight: 400;
readonly fontStyle: 'normal';
Expand All @@ -1276,7 +1276,7 @@ export declare const tokens: {
'Lucida Grande',
'sans-serif',
];
readonly fontSize: '12px';
readonly fontSize: '28px';
readonly lineHeight: 1.3;
readonly fontWeight: 400;
readonly fontStyle: 'normal';
Expand All @@ -1291,7 +1291,7 @@ export declare const tokens: {
'Lucida Grande',
'sans-serif',
];
readonly fontSize: '12px';
readonly fontSize: '34px';
readonly lineHeight: 1.3;
readonly fontWeight: 400;
readonly fontStyle: 'normal';
Expand Down Expand Up @@ -1321,7 +1321,7 @@ export declare const tokens: {
'Lucida Grande',
'sans-serif',
];
readonly fontSize: '12px';
readonly fontSize: '14px';
readonly lineHeight: 1.3;
readonly fontWeight: 700;
readonly fontStyle: 'normal';
Expand All @@ -1336,7 +1336,7 @@ export declare const tokens: {
'Lucida Grande',
'sans-serif',
];
readonly fontSize: '12px';
readonly fontSize: '15px';
readonly lineHeight: 1.3;
readonly fontWeight: 700;
readonly fontStyle: 'normal';
Expand All @@ -1351,7 +1351,7 @@ export declare const tokens: {
'Lucida Grande',
'sans-serif',
];
readonly fontSize: '12px';
readonly fontSize: '17px';
readonly lineHeight: 1.3;
readonly fontWeight: 700;
readonly fontStyle: 'normal';
Expand All @@ -1366,7 +1366,7 @@ export declare const tokens: {
'Lucida Grande',
'sans-serif',
];
readonly fontSize: '12px';
readonly fontSize: '20px';
readonly lineHeight: 1.3;
readonly fontWeight: 700;
readonly fontStyle: 'normal';
Expand All @@ -1381,7 +1381,7 @@ export declare const tokens: {
'Lucida Grande',
'sans-serif',
];
readonly fontSize: '12px';
readonly fontSize: '24px';
readonly lineHeight: 1.3;
readonly fontWeight: 700;
readonly fontStyle: 'normal';
Expand All @@ -1396,7 +1396,7 @@ export declare const tokens: {
'Lucida Grande',
'sans-serif',
];
readonly fontSize: '12px';
readonly fontSize: '28px';
readonly lineHeight: 1.3;
readonly fontWeight: 700;
readonly fontStyle: 'normal';
Expand All @@ -1411,7 +1411,7 @@ export declare const tokens: {
'Lucida Grande',
'sans-serif',
];
readonly fontSize: '12px';
readonly fontSize: '34px';
readonly lineHeight: 1.3;
readonly fontWeight: 700;
readonly fontStyle: 'normal';
Expand Down Expand Up @@ -1441,7 +1441,7 @@ export declare const tokens: {
'Lucida Grande',
'sans-serif',
];
readonly fontSize: '12px';
readonly fontSize: '14px';
readonly lineHeight: 1.3;
readonly fontWeight: 400;
readonly fontStyle: 'Italic';
Expand All @@ -1456,7 +1456,7 @@ export declare const tokens: {
'Lucida Grande',
'sans-serif',
];
readonly fontSize: '12px';
readonly fontSize: '15px';
readonly lineHeight: 1.3;
readonly fontWeight: 400;
readonly fontStyle: 'italic';
Expand All @@ -1471,7 +1471,7 @@ export declare const tokens: {
'Lucida Grande',
'sans-serif',
];
readonly fontSize: '12px';
readonly fontSize: '17px';
readonly lineHeight: 1.3;
readonly fontWeight: 400;
readonly fontStyle: 'italic';
Expand All @@ -1486,7 +1486,7 @@ export declare const tokens: {
'Lucida Grande',
'sans-serif',
];
readonly fontSize: '12px';
readonly fontSize: '20px';
readonly lineHeight: 1.3;
readonly fontWeight: 400;
readonly fontStyle: 'italic';
Expand All @@ -1501,7 +1501,7 @@ export declare const tokens: {
'Lucida Grande',
'sans-serif',
];
readonly fontSize: '12px';
readonly fontSize: '24px';
readonly lineHeight: 1.3;
readonly fontWeight: 400;
readonly fontStyle: 'italic';
Expand All @@ -1516,7 +1516,7 @@ export declare const tokens: {
'Lucida Grande',
'sans-serif',
];
readonly fontSize: '12px';
readonly fontSize: '28px';
readonly lineHeight: 1.3;
readonly fontWeight: 400;
readonly fontStyle: 'italic';
Expand All @@ -1531,7 +1531,7 @@ export declare const tokens: {
'Lucida Grande',
'sans-serif',
];
readonly fontSize: '12px';
readonly fontSize: '34px';
readonly lineHeight: 1.3;
readonly fontWeight: 400;
readonly fontStyle: 'italic';
Expand Down
Loading