github carbon-design-system/carbon-preprocess-svelte v0.11.61

45 minutes ago

Performance

  • prune Carbon design tokens (--cds-*) nothing reads (9.0–15.0% smaller optimized CSS on carbon-components-svelte 0.114)

Fixes

  • upgrade caligula to 0.4.0: drop a repeated empty @layer block once an earlier one fixes its order, as PostCSS does

Carbon 0.114 defines about 400 tokens in a 15 kB :root block, and an app reads a few dozen. optimizeCss and OptimizeCssPlugin now keep a token only if the kept CSS reads it (directly or through another kept token), or the bundle's scripts, markup or content files name it. A name built at runtime (`--cds-${name}`) keeps every token with that prefix. optimizeCarbonCss prunes tokens only when given sources; the CLI never does. A token read only outside the bundle, such as a stylesheet in public/, needs content to cover that file. Golden app optimized CSS on carbon-components-svelte 0.114.2:

Golden app optimized CSS v0.11.60 v0.11.61
admin-dashboard 134.44 kB 121.27 kB
signup-wizard 94.63 kB 81.65 kB
docs-site 86.79 kB 73.74 kB
product-catalog 146.57 kB 133.42 kB

Don't miss a new carbon-preprocess-svelte release

NewReleases is sending notifications on new releases.