Skip to content

docs: clarify stylesheet cascade layers - #721

Merged
floor merged 2 commits into
mainfrom
docs/stylesheet-layers
Dec 2, 2026
Merged

floor merged 2 commits into
mainfrom
docs/stylesheet-layers

Conversation

@floor

@floor floor commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Summary

Explain the CSS cascade for material/styles, material/styles/base and the per-component stylesheets in both READMEs.

Evidence

  • The stable build’s full styles.css has zero @layer rules. The base and per-component stylesheets contain ordered mtrl.* layers.
  • Both README checks passed, including six examples in Chromium. All 61 targeted tests, TypeScript, lint and changelog checks passed.

Size: 943,743 B packed (+5,533 B against v3.16.18). Earlier merged fixes account for +5,430 B. The npm README clarification adds 103 B to the packed archive.

Agent: GPT Sol 6.2 · builder

Describe the cascade for the layered base and component stylesheets and
the unlayered all-in-one stylesheet in both READMEs.

Agent: GPT Sol 6.2 · builder
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Package size

943,738 B packed (+107 B since v3.16.19).
Head 22c61445. Base release v3.16.19.

Measurement Base Head Delta
Tarball compressed 943,631 B 943,738 B +107 B
Package unpacked 5,376,796 B 5,377,103 B +307 B
SSR entry raw 308,771 B 308,771 B 0 B
SSR entry gzip 112,614 B 112,614 B 0 B
SSR page inline raw 286,109 B 286,109 B 0 B
SSR page inline gzip 5,810 B 5,810 B 0 B
SSR page link raw 43,181 B 43,181 B 0 B
SSR page link gzip 1,046 B 1,046 B 0 B
Packed addClass gzip 394 B 394 B 0 B
Packed button gzip 15,095 B 15,095 B 0 B
Packed slider gzip 13,197 B 13,197 B 0 B
Packed navigation-rail gzip 7,884 B 7,884 B 0 B
Packed navigation-rail-css gzip 5,341 B 5,341 B 0 B
Packed text-field gzip 10,254 B 10,254 B 0 B
Packed form gzip 21,695 B 21,695 B 0 B
Packed all-js gzip 140,492 B 140,492 B 0 B
Packed base-css gzip 3,102 B 3,102 B 0 B
Packed base-lite-css gzip 1,733 B 1,733 B 0 B
Packed base-elements-css gzip 2,810 B 2,810 B 0 B
Packed button-css gzip 5,605 B 5,605 B 0 B
Packed select-css gzip 8,257 B 8,257 B 0 B
Packed slider-css gzip 5,015 B 5,015 B 0 B
Packed full-css gzip 62,515 B 62,515 B 0 B
Packed button-initial gzip 8,532 B 8,532 B 0 B
SSR adapter react raw 4,265 B 4,265 B 0 B
SSR adapter svelte raw 1,474 B 1,474 B 0 B
SSR adapter vue raw 1,360 B 1,360 B 0 B
SSR adapter solid raw 456 B 456 B 0 B
Slider inline gzip 13,002 B 13,002 B 0 B
Vite addClass initial gzip 491 B 491 B 0 B
Vite text-field initial gzip 10,658 B 10,658 B 0 B
Vite button initial gzip 9,443 B 9,443 B 0 B
Vite theme initial gzip 17,106 B 17,106 B 0 B
Vite theme-image initial gzip 20,717 B 20,717 B 0 B
Vite theme-2025 initial gzip 20,721 B 20,721 B 0 B
Vite theme-2025-image initial gzip 24,289 B 24,289 B 0 B
Component core gzip 3,806 B 3,806 B 0 B
Component core deferred gzip 0 B 0 B 0 B
Component badge gzip 6,077 B 6,077 B 0 B
Component badge deferred gzip 0 B 0 B 0 B
Component bottom-app-bar gzip 4,957 B 4,957 B 0 B
Component bottom-app-bar deferred gzip 0 B 0 B 0 B
Component bottom-sheet gzip 9,059 B 9,059 B 0 B
Component bottom-sheet deferred gzip 0 B 0 B 0 B
Component side-sheet gzip 7,538 B 7,538 B 0 B
Component side-sheet deferred gzip 0 B 0 B 0 B
Component button gzip 8,570 B 8,570 B 0 B
Component button deferred gzip 7,158 B 7,158 B 0 B
Component button-group gzip 13,368 B 13,368 B 0 B
Component button-group deferred gzip 7,163 B 7,163 B 0 B
Component card gzip 7,959 B 7,959 B 0 B
Component card deferred gzip 10,227 B 10,227 B 0 B
Component carousel gzip 13,827 B 13,827 B 0 B
Component carousel deferred gzip 0 B 0 B 0 B
Component checkbox gzip 6,499 B 6,499 B 0 B
Component checkbox deferred gzip 0 B 0 B 0 B
Component chips gzip 10,272 B 10,272 B 0 B
Component chips deferred gzip 0 B 0 B 0 B
Component datepicker gzip 13,907 B 13,907 B 0 B
Component datepicker deferred gzip 0 B 0 B 0 B
Component dialog gzip 13,537 B 13,537 B 0 B
Component dialog deferred gzip 7,160 B 7,160 B 0 B
Component divider gzip 4,548 B 4,548 B 0 B
Component divider deferred gzip 0 B 0 B 0 B
Component drawer gzip 11,103 B 11,103 B 0 B
Component drawer deferred gzip 0 B 0 B 0 B
Component fab gzip 6,371 B 6,371 B 0 B
Component fab deferred gzip 0 B 0 B 0 B
Component fab-menu gzip 11,614 B 11,614 B 0 B
Component fab-menu deferred gzip 12,024 B 12,024 B 0 B
Component extended-fab gzip 7,092 B 7,092 B 0 B
Component extended-fab deferred gzip 0 B 0 B 0 B
Component icon-button gzip 7,365 B 7,365 B 0 B
Component icon-button deferred gzip 0 B 0 B 0 B
Component list gzip 8,087 B 8,087 B 0 B
Component list deferred gzip 0 B 0 B 0 B
Component menu gzip 14,775 B 14,775 B 0 B
Component menu deferred gzip 2,144 B 2,144 B 0 B
Component navigation-bar gzip 6,830 B 6,830 B 0 B
Component navigation-bar deferred gzip 0 B 0 B 0 B
Component navigation-rail gzip 7,713 B 7,713 B 0 B
Component navigation-rail deferred gzip 0 B 0 B 0 B
Component progress gzip 11,576 B 11,576 B 0 B
Component progress deferred gzip 0 B 0 B 0 B
Component loading-indicator gzip 10,184 B 10,184 B 0 B
Component loading-indicator deferred gzip 0 B 0 B 0 B
Component split-button gzip 11,019 B 11,019 B 0 B
Component split-button deferred gzip 18,840 B 18,840 B 0 B
Component radios gzip 5,981 B 5,981 B 0 B
Component radios deferred gzip 0 B 0 B 0 B
Component search gzip 12,120 B 12,120 B 0 B
Component search deferred gzip 0 B 0 B 0 B
Component select gzip 14,589 B 14,589 B 0 B
Component select deferred gzip 12,136 B 12,136 B 0 B
Component slider gzip 13,102 B 13,102 B 0 B
Component slider deferred gzip 0 B 0 B 0 B
Component snackbar gzip 13,677 B 13,677 B 0 B
Component snackbar deferred gzip 7,162 B 7,162 B 0 B
Component switch gzip 7,065 B 7,065 B 0 B
Component switch deferred gzip 0 B 0 B 0 B
Component tabs gzip 14,691 B 14,691 B 0 B
Component tabs deferred gzip 7,169 B 7,169 B 0 B
Component text-field gzip 9,749 B 9,749 B 0 B
Component text-field deferred gzip 0 B 0 B 0 B
Component timepicker gzip 12,342 B 12,342 B 0 B
Component timepicker deferred gzip 0 B 0 B 0 B
Component top-app-bar gzip 5,239 B 5,239 B 0 B
Component top-app-bar deferred gzip 0 B 0 B 0 B
Component tooltip gzip 7,616 B 7,616 B 0 B
Component tooltip deferred gzip 0 B 0 B 0 B
Component toolbar gzip 12,435 B 12,435 B 0 B
Component toolbar deferred gzip 7,161 B 7,161 B 0 B
Component all gzip 137,335 B 137,335 B 0 B
Component all deferred gzip 2,155 B 2,155 B 0 B
Component shapes gzip 4,184 B 4,184 B 0 B
Component shapes deferred gzip 0 B 0 B 0 B
Component shape-heart gzip 2,623 B 2,623 B 0 B
Component shape-heart deferred gzip 0 B 0 B 0 B
Component datepicker-deferred gzip 10,056 B 10,056 B 0 B
Component datepicker-deferred deferred gzip 6,313 B 6,313 B 0 B

@floor

floor commented Dec 2, 2026

Copy link
Copy Markdown
Owner Author

Signed off at 0f2efdba97fdd0e301818ce7191559774e040108. CI run 46800132444: all 68 checks green. Package 943,743 B packed, +5,533 B since v3.16.18 per the CI size comment.

Docs only — README.md and npm-readme.md — and every claim in the new wording checks out against the published package and the build: the stable dist's styles.css carries 0 @layer rules; styles/base.css declares the ordered mtrl.* layers (mtrl.preupgrade, mtrl.base, mtrl.utilities, … mtrl.toolbar) and styles/button.css uses mtrl.button; and scripts/build-styles.ts wraps the base in @layer mtrl.base and each component sheet in @layer mtrl.<name> while leaving the all-in-one sheet unwrapped. The text now says exactly that — layered base and per-component sheets, normal unlayered application rules winning over them, and the all-in-one sheet competing by specificity and source order. No product code changes.

Agent: DeepSeek V4.1 Flash · implementer

Agent: GPT Sol 6.2 · builder
@floor
floor merged commit ffc6a3b into main Dec 2, 2026
68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant