Files
livewire-material/resources/css/layout/pane.css
T
Andreas Reinhold / reiniandClaude Opus 5 fb7007c976
tests / feature (8.4) (push) Successful in 2m0s
tests / feature (8.5) (push) Successful in 2m0s
tests / browser (chrome, chromium) (push) Failing after 8m3s
tests / browser (firefox, firefox) (push) Failing after 12m58s
tests / browser (safari, webkit) (push) Failing after 13m8s
Take Tailwind out of the package, and its detection out of the guard
Tailwind left the stack in 2.0.0, but the package still carried about 330
mentions of it. What the guard's Tailwind detection protected — a class
that compiles to nothing — is now protected by a check that does not care
where a dead class came from.

DesignGuard: about 500 lines of Tailwind tables, scales, palettes and
"2.0.0 replacement" hints give way to one check — a class a view or PHP
file writes that neither the application's stylesheets nor the package's
own declare. It catches a utility of any framework, a typo and a class
whose rules were deleted alike, so it also found two classes ReStride
draws nothing with. A stylesheet has to be in reach for it: the `.css`
files among the scanned paths, or what the `missingStylesheets()` entry
imports. The class reader no longer mistakes an array index for a class
list (`$block['base']`), and it reads the array a class helper is given,
where it read nothing before.

The package's own three Tailwind self-guards go with it. Only their one
unique check stays, as a test of its own: every `matchMedia` width in
resources/js is an M3 breakpoint.

The pagination views are `material.blade.php` and
`simple-material.blade.php`; only Laravel's and Livewire's default theme
names ever made them `tailwind`. The provider sets `Paginator`'s default
views and switches `livewire.pagination_theme` to `material` when it is
still Livewire's own default, so no application can forget the config; a
theme an application chose, and a component's own `$paginationTheme` or
`paginationView()`, still win.

The rest is prose: the layer-order guidance for an application that still
builds Tailwind, the Tailwind wording in the README, the Boost guidelines
and the development skill, and about 25 "this used to be a Tailwind
utility" comments, along with every "plan step NN" pointer into a
gitignored folder. The reset keeps its credit, and NOTICE now carries it
too.

Feature suite 1159 passed, Chrome browser suite 299 passed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-17 21:07:39 +02:00

76 lines
3.0 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* <x-pane>: a content region, with M3's margins and, optionally, a top app bar of its own.
*
* M3 puts all content in panes (docs/reference/m3/foundations.md § Layout → Scaffold, "all content
* must live in a pane") and lets each carry its own app bar. The margin is the space between the
* window's edge and what is inside: 16px below medium and 24px from it (600px), from the
* per-breakpoint table in docs/reference/m3/foundations-supplement.md § Breakpoints, as
* `--md-sys-measurement-space200` and `space300`.
*
* The margin sits on the pane's body and its section navigation, not on the pane: the app bar is a
* direct child of the pane, so it spans the pane from edge to edge and its `position: sticky` holds
* for the pane's whole height (a sticky element never leaves its parent). A margin is drawn once:
* a region that already keeps its content off the window's edge — a pane's body, the canonical
* layouts, the scaffold's content region — sets `--md-layout-margin` to 0px for what is inside it,
* and a pane there draws none of its own, until an <x-surface> gives it a new edge to keep off.
*
* `data-md-width` caps the pane and centres it: `narrow` 40rem, M3's 4060 characters a line
* (§ Layout → Breakpoints, "keep text to 4060 characters per line"), in rem because it is a measure
* of text; `medium` 60rem and `wide` 80rem are the package's steps above it; `full` (the default)
* fills the room it has, M3's flexible pane. The back button of `data-md-pane-back` points the
* way it goes, so it mirrors in a right-to-left document (§ Layout → Bidirectionality / RTL).
*
* In `material.layout`; `hide-below`/`hide-from` come from visibility.css. Imports app-bar.css and
* button.css for the pane's own top app bar and its back button.
*/
@layer material.reset, material.tokens, material.base, material.layout, material.components, material.text, material.visibility;
@import './visibility.css';
@import '../components/app-bar.css';
@import '../components/button.css';
@layer material.layout {
[data-md-pane] {
display: flex;
flex-direction: column;
inline-size: 100%;
min-inline-size: 0;
margin-inline: auto;
}
[data-md-pane][data-md-width='narrow'] {
max-inline-size: 40rem;
}
[data-md-pane][data-md-width='medium'] {
max-inline-size: 60rem;
}
[data-md-pane][data-md-width='wide'] {
max-inline-size: 80rem;
}
[data-md-pane-navigation],
[data-md-pane-body] {
padding-inline: var(--md-layout-margin, var(--md-sys-measurement-space200));
@media (width >= 600px) {
padding-inline: var(--md-layout-margin, var(--md-sys-measurement-space300));
}
}
[data-md-pane-body] {
flex: 1 1 auto;
min-inline-size: 0;
}
[data-md-pane-body] > * {
--md-layout-margin: 0px;
}
[data-md-pane-back] [data-md-icon]:is([dir='rtl'], [dir='rtl'] *) {
transform: scaleX(-1);
}
}