Fold layout.css and components.css into all.css
Plan step 37: all.css replaces the two interim import lists with one entry for an application that wants everything — the foundation, every layout stylesheet and every component stylesheet, grouped under the same block comments components.css used, plus a Layout block. It also directly imports the three files nothing imported by name before (layout/spacing.css, layout/visibility.css, components/selection.css), so every file under components/ and layout/ is now one @import away. Every test that read a block of components.css or layout.css now reads the matching block of all.css through one shared helper (allCssBlock(), in tests/Pest.php so it loads for any test run) instead of repeating the same substr() search in each file. StylesheetsTest.php's shape, Tailwind-free and breakpoint checks, previously run twice (once for the foundation, once for the layout tree), now run once over the whole tree all.css reaches, since every component and layout stylesheet is plain CSS after step 36; a new test asserts all.css imports everything under components/ and layout/ exactly once. The Workbench imports all.css in place of layout.css and components.css. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
04271bf227
commit
925d9a4439
@@ -9,7 +9,7 @@ use NoNameWeb\LivewireMaterial\Tests\Support\ViewClasses;
|
||||
* `data-md-*` attributes and no class list of its own beyond the interaction and text classes
|
||||
* (tests/Support/ViewClasses.php), and each has a stylesheet in `material.components` that imports
|
||||
* the stylesheets of the components its view renders, writes its values from the tokens and its
|
||||
* breakpoints as px range queries, and is imported from the "Containment" block of components.css.
|
||||
* breakpoints as px range queries, and is imported from the "Containment" block of all.css.
|
||||
*
|
||||
* The dataset grew by one name per component commit, the same rule InputStylesheetsTest.php and
|
||||
* ActionStylesheetsTest.php follow. The error layout, whose view is not a component, has the same
|
||||
@@ -108,12 +108,8 @@ it('takes its values from the tokens and its breakpoints in px', function (strin
|
||||
assertContainmentTokensAndPxBreakpoints(ComponentStylesheet::read($name), "{$name}.css");
|
||||
})->with('containment components');
|
||||
|
||||
it('is imported from the containment block of components.css', function (string $name) {
|
||||
$components = File::get(__DIR__.'/../../../resources/css/components.css');
|
||||
$block = substr($components, (int) strpos($components, '/* Containment */'));
|
||||
$block = substr($block, 0, (int) strpos($block, '/* Navigation */'));
|
||||
|
||||
expect($block)->toContain("@import './components/{$name}.css';");
|
||||
it('is imported from the containment block of all.css', function (string $name) {
|
||||
expect(allCssBlock('Containment'))->toContain("@import './components/{$name}.css';");
|
||||
})->with('containment components');
|
||||
|
||||
it('scopes every element-wide selector to a data-md hook', function (string $name) {
|
||||
|
||||
Reference in New Issue
Block a user