Skip to content

Commit

Permalink
Move body from typography to general, disable declaration-property-un…
Browse files Browse the repository at this point in the history
…it-allowed-list, T-13959
  • Loading branch information
ronilaukkarinen committed Oct 25, 2024
1 parent 527df33 commit b79facd
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 76 deletions.
20 changes: 1 addition & 19 deletions .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -170,24 +170,6 @@
]
}
],
"declaration-property-unit-allowed-list": [
{
"font-size": [
"rem",
"em",
"px"
],
"/^animation/": [
"ms",
"s"
],
"line-height": [
"px",
"%",
""
]
}
],
"a11y/font-size-is-readable": [
true,
{
Expand Down Expand Up @@ -224,4 +206,4 @@
"background"
]
}
}
}
32 changes: 16 additions & 16 deletions css/dev/global.css

Large diffs are not rendered by default.

30 changes: 16 additions & 14 deletions css/dev/gutenberg-editor-styles.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/prod/global.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/prod/gutenberg-editor-styles.css

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions sass/layout/_general.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@
// that apply everywhere throughout the website. Add more
// always repeating elements right below.

// Set root size for rems
:root {
font-size: 62.5%;
}

// Body
.is-root-container,
.acf-block-preview .block,
body {
color: var(--color-paragraph);
font-family: var(--font-paragraph);
font-size: var(--font-size-paragraph);
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-weight: var(--font-weight-paragraph);
line-height: var(--line-height-paragraph);
// stylelint-disable-next-line value-keyword-case
text-rendering: geometricPrecision;
}

// Default structural element
.block {
background-color: var(--color-white);
Expand Down
25 changes: 0 additions & 25 deletions sass/layout/_typography.scss
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
// stylelint-disable declaration-property-unit-allowed-list
// Everything around fonts, font size definitions and typeset
// presets. No modular scale, but a sophisticated viewport
// based responsive mixin can be found in _helpers.scss

// Set root size for rems
:root {
font-size: 62.5%;
}

// Typography settings
.is-root-container,
.acf-block-preview .block,
body {
color: var(--color-paragraph);
font-family: var(--font-paragraph);
font-size: var(--font-size-paragraph);
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-weight: var(--font-weight-paragraph);
line-height: var(--line-height-paragraph);
// stylelint-disable-next-line value-keyword-case
text-rendering: geometricPrecision;
}

// Heading defaults
h1,
h2,
Expand Down

0 comments on commit b79facd

Please sign in to comment.