Closed MoOx closed 9 years ago
erm.. totally expected. custom property --font-size
isn't defined anywhere, so it use var(--fontSize)
-> 2em.
According to spec, it's a wrong behavior. Please this example on Firefox (which support custom props) with a viewport > 64em and one < 64em. You will understand my concern.
The output is as expected. --fontSize !== --font-size
To get what you expect/desire, try this:
:root { --fontSize: 2em; }
.Section { font-size: var(--fontSize); }
@media (min-width: 64em) {
:root { --fontSize: 3em; }
}
My bad for this :)
The output is as expected. --fontSize !== --font-size
exactly.
Input
Output
This is totally unexpected. I expect in a way, to have a font-size corresponding to the definition in the media query.