Files
livewire-material/resources/css/foundation.css
T
Andreas Reinhold / reiniandClaude Opus 5 c545fb69ef Add the foundation stylesheet, written without Tailwind
Plan step 33. foundation.css is the one required import: the full
material layer statement, then plain imports of its parts, each opening
with the same statement.

- foundation/reset.css (material.reset): Tailwind 4's preflight rule for
  rule, with M3's on-surface-variant placeholder and no typeface.
- foundation/hidden.css: [hidden] and [x-cloak], outside every layer.
- foundation/tokens.css (material.tokens): the token files.
- foundation/base.css (material.base): the page's surface, ink and
  brand typeface, and the font face.
- foundation/interaction.css (material.base): md-state-layer,
  md-focus-ring, md-touch-target and md-link, the plain-CSS forms of the
  utilities; md-state-layer also takes data-md-dragged, and
  md-touch-target is 48px (space600) where the utility reads 3rem.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
2026-09-14 13:43:04 +02:00

38 lines
2.1 KiB
CSS

/*
* Livewire Material — the foundation, the one stylesheet every application imports, first:
*
* @import '../../vendor/nonameweb/livewire-material/resources/css/foundation.css';
* @import './material-scheme.css';
*
* Plain CSS, no build step of its own: an application's bundler (Vite) inlines the imports, and a
* browser could read the files as they are.
*
* Every rule of the package sits in a sub-layer of `material`, in this order, lowest first:
*
* material.reset foundation/reset.css — the browser's defaults taken back
* material.tokens foundation/tokens.css — every `--md-sys-*` and `--md-ref-*` property
* material.base foundation/base.css, foundation/interaction.css — the page, the font
* face, and md-state-layer, md-focus-ring, md-touch-target, md-link
* material.layout the layout components: scaffold, panes, the canonical layouts
* material.components the components
* material.text text.css — md-type-*, md-ink-*, and the few classes for text
* material.visibility hiding an element below or from a breakpoint, over a component's display
*
* Every package stylesheet opens with the same layer statement, before its imports, so the order
* holds whichever file a bundler reaches first. An application's own CSS is unlayered and
* therefore outranks every package rule, whatever the selector — an application's broad selector
* (`button { … }`) restyles the components too. foundation/hidden.css keeps its two `!important`
* rules outside the layers, so `hidden` and `x-cloak` hide an element whatever sets its display.
*
* Until the components leave Tailwind, an application still building it imports this file before
* `@import 'tailwindcss'`, so the `material` layers are declared first and sit below Tailwind's.
*/
@layer material.reset, material.tokens, material.base, material.layout, material.components, material.text, material.visibility;
@import './foundation/reset.css';
@import './foundation/hidden.css';
@import './foundation/tokens.css';
@import './foundation/base.css';
@import './foundation/interaction.css';