Browser: Chrome 115
OS: macOS
Hello Bricks team!
Since v1.8.4, in the editor, Bricks uses a :where() pseudo class to output the values from the theme styles > typography > all headings settings.
v1.8.3 and below:
h1, h2, h3, h4, h5, h6 {
line-height: var(--o-font-lineheight-1);
font-size: var(--o-fluid-font);
font-family: var(--o-font-sans);
}
Since v1.8.4
:where(h1, h2, h3, h4, h5, h6) {
line-height: var(--o-font-lineheight-1);
font-size: var(--o-fluid-font);
font-family: var(--o-font-sans);
}
This gives user defined preferences a specificity of zero. Therefore, the Bricks base default font size for headings, h1 for example:
h1 {
font-size: 2.4em;
}
Takes precedence over the user defined values because it has a higher specificity. This results in a wrong font size output in the Bricks editor, where it is correct on front-end.
In my opinion, Bricks defaults should not have a higher specificity than user defined styles.
Suggestion:
- Use a :where() pseudo class also for all Bricks defaults.
- Even better, use a @layer bricks-defaults for all Bricks defaults, then a @layer bricks-user for all user defined values.