You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using nuxt fonts to set different fonts for specific CSS classes works perfectly for single-level classes, but when trying to apply a font to nested CSS classes, it does not load as expected.
For example, Lato works fine for .lato, but Nunito fails to apply in nested elements like .nunito p:
<template>
<divclass="lato">
'Lato works!'
<divclass="nunito">
<p>'Nunito does not work :('</p>
</div>
</div>
</template>
<stylescoped>.lato {font-family: 'Lato';}.nunito {p {font-family: 'Nunito'; }}</style>
Reproduction steps
Apply a font family using nuxt fonts to a nested CSS class selector.
Note that the font only applies to single-level selectors, not nested ones like .nunito p.
Expected behaviour
Both fonts should be applied according to the CSS structure, with Lato on the outer div and Nunito on the inner <p> element.
Description
Using nuxt fonts to set different fonts for specific CSS classes works perfectly for single-level classes, but when trying to apply a font to nested CSS classes, it does not load as expected.
For example, Lato works fine for
.lato
, but Nunito fails to apply in nested elements like.nunito p
:Reproduction steps
Expected behaviour
Both fonts should be applied according to the CSS structure, with
Lato
on the outerdiv
andNunito
on the inner<p>
element.Reproduction link
Stackblitz repro
The text was updated successfully, but these errors were encountered: