Directives & settings

Native CSS preservation

Keep a stylesheet’s native class rules when source-based pruning would remove them.

Native CSS is preserved by default, even when a class list is supplied. Set pruneNativeCSS: true in an integration or stylesheet API to prune project-owned sources. Package CSS stays preserved unless its own source explicitly opts in.

@prune native

CSS
@prune native;.used {  color: red;}.unused {  color: blue;}

This directive opts only its declaring file into pruning. It does not propagate to imported stylesheets. @preserve native; takes precedence in the same file, including when the integration enables project-wide pruning. The native-output switch preserveNativeCSS: false is separate and suppresses native output regardless of either directive.

@preserve native

Use @preserve native; when a Master-managed stylesheet contains native CSS class rules that must not be removed by native CSS pruning.

CSS
@import "@master/css";@preserve native;.injected-by-payment-widget {  color: blue;}

The stylesheet is still processed by Master CSS. Native class rules are retained even when no scanned source uses their classes; ordinary compiler normalization still applies. This policy does not force unused managed classes into the generated output and does not mean that the original CSS bytes are preserved.

For the full native CSS pruning model, see Native CSS pruning.

Group rule identity

Each item in a declaration group retains its declaration identity, value source, conditions, importance, and shorthand or longhand priority. Groups can emit multiple rules for the same escaped group selector. This lets direct values override tokens within the same scope in generated CSS, SSR, and hydration, independently of item order.


© 2026 Aoyue Design LLC.MIT License
Trademark Policy