Skip to content

Commit

Permalink
feat(PPDSC-2256): update dropcap logical props and presets (#312)
Browse files Browse the repository at this point in the history
* feat(PPDSC-2256): update dropcap logical props and presets

* feat(PPDSC-2256): add unit test

* feat(PPDSC-2256): design review comments

* feat(PPDSC-2256): update story name
  • Loading branch information
evgenitsn authored Jul 28, 2022
1 parent 2eaa33b commit 1af06df
Show file tree
Hide file tree
Showing 11 changed files with 436 additions and 98 deletions.
168 changes: 120 additions & 48 deletions site/theme/__tests__/__snapshots__/doc-theme.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2075,16 +2075,25 @@ Object {
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap010": Object {
"fontSize": "5.625em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize120}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap020": Object {
"fontSize": "5.875em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize130}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap030": Object {
"fontSize": "6em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize140}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialHeadline010": Object {
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
Expand Down Expand Up @@ -4474,16 +4483,25 @@ Object {
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap010": Object {
"fontSize": "5.625em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize120}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap020": Object {
"fontSize": "5.875em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize130}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap030": Object {
"fontSize": "6em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize140}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialHeadline010": Object {
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
Expand Down Expand Up @@ -6876,16 +6894,25 @@ Object {
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap010": Object {
"fontSize": "5.625em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize120}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap020": Object {
"fontSize": "5.875em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize130}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap030": Object {
"fontSize": "6em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize140}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialHeadline010": Object {
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
Expand Down Expand Up @@ -9275,16 +9302,25 @@ Object {
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap010": Object {
"fontSize": "5.625em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize120}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap020": Object {
"fontSize": "5.875em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize130}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap030": Object {
"fontSize": "6em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize140}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialHeadline010": Object {
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
Expand Down Expand Up @@ -11677,16 +11713,25 @@ Object {
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap010": Object {
"fontSize": "5.625em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize120}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap020": Object {
"fontSize": "5.875em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize130}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap030": Object {
"fontSize": "6em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize140}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialHeadline010": Object {
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
Expand Down Expand Up @@ -14076,16 +14121,25 @@ Object {
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap010": Object {
"fontSize": "5.625em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize120}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap020": Object {
"fontSize": "5.875em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize130}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap030": Object {
"fontSize": "6em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize140}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialHeadline010": Object {
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
Expand Down Expand Up @@ -16478,16 +16532,25 @@ Object {
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap010": Object {
"fontSize": "5.625em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize120}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap020": Object {
"fontSize": "5.875em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize130}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap030": Object {
"fontSize": "6em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize140}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialHeadline010": Object {
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
Expand Down Expand Up @@ -18877,16 +18940,25 @@ Object {
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap010": Object {
"fontSize": "5.625em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize120}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap020": Object {
"fontSize": "5.875em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize130}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap030": Object {
"fontSize": "6em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontSize": "{{fonts.fontSize140}}",
"fontWeight": "{{fonts.fontWeight040}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialHeadline010": Object {
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
Expand Down
14 changes: 13 additions & 1 deletion site/theme/typography-presets.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,17 @@
"fontSize": "{{fonts.fontSize030}}",
"fontWeight": "{{fonts.fontWeight010}}",
"lineHeight": "{{fonts.fontLineHeight040}}"
},
"editorialDropCap010": {
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontWeight": "{{fonts.fontWeight040}}"
},
"editorialDropCap020": {
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontWeight": "{{fonts.fontWeight040}}"
},
"editorialDropCap030": {
"fontFamily": "{{fonts.fontFamily030.fontFamily}}",
"fontWeight": "{{fonts.fontWeight040}}"
}
}
}
21 changes: 15 additions & 6 deletions src/theme/__tests__/__snapshots__/creator.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -840,16 +840,25 @@ Object {
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap010": Object {
"fontSize": "5.625em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily020.fontFamily}}",
"fontSize": "{{fonts.fontSize120}}",
"fontWeight": "{{fonts.fontWeight020}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap020": Object {
"fontSize": "5.875em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily020.fontFamily}}",
"fontSize": "{{fonts.fontSize130}}",
"fontWeight": "{{fonts.fontWeight020}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap030": Object {
"fontSize": "6em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily020.fontFamily}}",
"fontSize": "{{fonts.fontSize140}}",
"fontWeight": "{{fonts.fontWeight020}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialHeadline010": Object {
"fontFamily": "{{fonts.fontFamily020.fontFamily}}",
Expand Down
32 changes: 25 additions & 7 deletions src/theme/__tests__/__snapshots__/theme.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -856,16 +856,25 @@ Object {
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap010": Object {
"fontSize": "5.625em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily020.fontFamily}}",
"fontSize": "{{fonts.fontSize120}}",
"fontWeight": "{{fonts.fontWeight020}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap020": Object {
"fontSize": "5.875em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily020.fontFamily}}",
"fontSize": "{{fonts.fontSize130}}",
"fontWeight": "{{fonts.fontWeight020}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialDropCap030": Object {
"fontSize": "6em",
"lineHeight": 0.85,
"fontFamily": "{{fonts.fontFamily020.fontFamily}}",
"fontSize": "{{fonts.fontSize140}}",
"fontWeight": "{{fonts.fontWeight020}}",
"letterSpacing": "{{fonts.fontLetterSpacing030}}",
"lineHeight": "{{fonts.fontLineHeight020}}",
},
"editorialHeadline010": Object {
"fontFamily": "{{fonts.fontFamily020.fontFamily}}",
Expand Down Expand Up @@ -2099,7 +2108,16 @@ Object {
},
"paragraph": Object {
"dropCap": Object {
"space": "space010",
"paddingBlockEnd": Object {
"lg": "space040",
"md": "space030",
"xs": "space020",
},
"paddingInlineEnd": Object {
"lg": "space040",
"md": "space030",
"xs": "space020",
},
"stylePreset": "inkContrast",
"typographyPreset": Object {
"lg": "editorialDropCap030",
Expand Down
21 changes: 15 additions & 6 deletions src/theme/compiler/__tests__/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -984,16 +984,25 @@ Object {
"lineHeight": 1.125,
},
"editorialDropCap010": Object {
"fontSize": "5.625em",
"lineHeight": 0.85,
"fontFamily": "\\"Bitter\\", serif",
"fontSize": "44px",
"fontWeight": 500,
"letterSpacing": "0",
"lineHeight": 1.125,
},
"editorialDropCap020": Object {
"fontSize": "5.875em",
"lineHeight": 0.85,
"fontFamily": "\\"Bitter\\", serif",
"fontSize": "48px",
"fontWeight": 500,
"letterSpacing": "0",
"lineHeight": 1.125,
},
"editorialDropCap030": Object {
"fontSize": "6em",
"lineHeight": 0.85,
"fontFamily": "\\"Bitter\\", serif",
"fontSize": "56px",
"fontWeight": 500,
"letterSpacing": "0",
"lineHeight": 1.125,
},
"editorialHeadline010": Object {
"fontFamily": "\\"Bitter\\", serif",
Expand Down
Loading

0 comments on commit 1af06df

Please sign in to comment.