Original CSS-
@media(min-width:720px) {
.class {
font-family: "EB Garamond", serif;
}
}
This would render as-
@media(min-width:720px) {
.class {
font-family: "EB Garamond", serif;
}
.eb-garamond @media(min-width:720px) {
font-family: "EB Garamond", serif;
}
}
This isn't correct CSS, so fonts being set inside a media query weren't being set correctly when they loaded. Correct CSS would be-
@media(min-width:720px) {
.class {
font-family: "EB Garamond", serif;
}
.eb-garamond .class{
font-family: "EB Garamond", serif;
}
}
Patch filters out selectors that start with "@media" and looks for the selector inside.
Comments
Comment #2
jamessw commentedComment #3
mikeytown2 commentedComment #4
mikeytown2 commentedThanks for the patch! It's been committed. Also added a couple of inline comments.