Files
livewire-material/resources/css/layout/list-detail.css
T
Andreas Reinhold / reiniandClaude Opus 5 27028bfb7a Import the button stylesheet from list-detail.css for its back button
Plan step 36, navigation review sweep. <x-list-detail> renders an
<x-button> as the single-pane back action, but only pane.css picked up
button.css when the carry-over landed; an application importing
layout/list-detail.css alone got an unstyled back button. A new check
reads every layout view's component tags against its stylesheet's
imports, as the group stylesheet tests do for components.

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

91 lines
3.5 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-list-detail>: M3's list-detail canonical layout — a list, and the detail of what it selected.
*
* Its visible-panes table, row by row (docs/reference/m3/foundations-supplement.md § Canonical
* layouts → List-detail):
*
* Compact (0599) 1 pane list, or the detail once something is selected
* Medium (600839) 1 or 2 1, M3's recommendation for a layout that is not low-density
* Expanded (840+) 2 list and detail side by side
* Large (12001599) 2 the same
* Extra-large (1600+) 2 the same
*
* Below 840px one pane shows: the list while `data-md-selected` is absent, the detail while it is
* there, with a back button — M3: "a Back button appears in the detail view only for single-pane
* layouts". From 840px the list is a fixed pane and the detail flexible, 24px apart: the fixed pane
* is 360dp at expanded and 412dp from large (§ Breakpoints, "fixed-and-flexible layout's fixed pane
* defaults to 360dp" at expanded and "412dp" at large and extra-large; 24dp margins and spacer),
* and every back button inside is hidden. Grid columns run in the inline direction, so in a
* right-to-left document the list is on the right — the mirror M3 requires of every canonical
* layout (docs/reference/m3/foundations.md § Layout → Bidirectionality / RTL) — and the back arrow
* turns with it.
*
* The layout keeps its content off the window's edge by M3's margin (16px below medium, 24px from
* it) unless it is inside something that already does (`--md-layout-margin`, pane.css), and tells
* what is inside it that the margin is drawn. A pane that is focused as a whole draws no outline:
* it is not a control, and the element focus lands on inside it is what shows the ring.
*
* In `material.layout`; the state and focus are resources/js/layout.js. Imports button.css for the
* detail pane's back button.
*/
@layer material.reset, material.tokens, material.base, material.layout, material.components, material.text, material.visibility;
@import './visibility.css';
@import '../components/button.css';
@layer material.layout {
[data-md-list-detail] {
display: grid;
grid-template-columns: minmax(0, 1fr);
align-items: start;
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));
}
@media (width >= 840px) {
grid-template-columns: 360px minmax(0, 1fr);
column-gap: var(--md-sys-measurement-space300);
}
@media (width >= 1200px) {
grid-template-columns: 412px minmax(0, 1fr);
}
}
[data-md-list-detail] > * {
--md-layout-margin: 0px;
}
[data-md-list-detail-pane] {
min-inline-size: 0;
outline: none;
}
[data-md-list-detail-back-row] {
display: flex;
align-items: center;
min-block-size: var(--md-sys-measurement-space800);
}
[data-md-list-detail-back] [data-md-icon]:dir(rtl) {
transform: scaleX(-1);
}
@media (width < 840px) {
[data-md-list-detail]:not([data-md-selected]) > [data-md-list-detail-pane='detail'],
[data-md-list-detail][data-md-selected] > [data-md-list-detail-pane='list'] {
display: none;
}
}
@media (width >= 840px) {
[data-md-list-detail-back-row],
[data-md-list-detail] [data-md-list-detail-back] {
display: none;
}
}
}