Sometimes it's undesirable to have have PageBuilder preface CSS rules. For example, the purpose of this CSS is top provide a default type face for the element (to avoid FOIT and FOUT) and then apply a custom font only after the font has been loaded:
.mastnav-top__item {
font-family: Helvetica;
}
html.font-Pratt-loaded .mastnav-top__item {
font-family: Pratt;
}
PB ends up producing this:
.pb-f-global-header-nav html.font-Pratt-loaded .mastnav-top__item { font-family:Pratt; }
...which obviously doesn't work.
It would be nice if, in the feature config.json, I could tell PB to not preface this css.
| Categories | Developer Workflow, Feature Configuration |
| I need it... | Not sure—just thought it was cool! |
Turns out I can achieve what I want with:
.mastnav-top__item {width: 50%;
font-family: Georgia;
font-size: rem(16);
}
html.font-Pratt-loaded _root .mastnav-top__item {
font-family: Pratt;
}