Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ Element applications can use `material/styles/base-elements` to keep the base's

`material/styles/base-lite` is a smaller option for element pages that also omit the page reset and contrast modes: it keeps the theme, tokens, body theme and global reduced-motion switch. Factory components and page-level `data-ripple` utilities need `material/styles/base`. Choose one base entry for the page.

Library styles sit in ordered `mtrl.*` cascade layers, so unlayered application CSS overrides them without specificity battles.
`material/styles/base` and the per-component stylesheets use ordered `mtrl.*` cascade layers. Normal unlayered application rules take precedence over those layered rules. The all-in-one `material/styles` stylesheet is unlayered, so normal application rules compete with it by specificity and source order.

Components can opt into the existing type-scale role properties through an application Sass build. Prebuilt CSS keeps the default profile. Load configuration first, then compile the factory stylesheet:

Expand Down
2 changes: 2 additions & 0 deletions npm-readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ document.body.append(name.element, save.element);

`material/styles` is a stylesheet, so this needs a bundler that handles CSS imports (Vite, webpack, Bun, …). Each factory returns a DOM element and a small API; call `destroy()` when the view goes away.

`material/styles/base` and the per-component stylesheets use ordered `mtrl.*` cascade layers. Normal unlayered application rules take precedence over those layered rules. The all-in-one `material/styles` stylesheet is unlayered, so normal application rules compete with it by specificity and source order.

For a factory page whose buttons stay filled, small and round, use the optional fixed-profile sheet:

```typescript
Expand Down