@font-feature-values Font Name {
font-display: swap;
@styleset {
nice-style: 12;
}
@swash {
fancy: 2;
}
}`@font-feature-values` CSS at-rule / notebook
`@font-feature-values` CSS at-rule
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
/* At-rule for "nice-style" in Font One */
@font-feature-values Font One {
@styleset {
nice-style: 12;
}
}
/* At-rule for "nice-style" in Font Two */
@font-feature-values Font Two {
@styleset {
nice-style: 4;
}
}
/* Apply the at-rules with a single declaration */
.nice-look {
font-variant-alternates: styleset(nice-style);
}