Ask breakpoints.js, not Tailwind's screens, for a window class
Plan step 16. `navigation.js` takes its standard-rail threshold from
`from('expanded')` (840px) instead of the 64rem it had, and `navigation.css`'s
three 64rem queries follow, so the whole expanded class gets the in-layout
collapsible rail M3 asks for rather than one that opens over a scrim (N-06);
its two 40rem queries become 37.5rem, the compact/medium boundary the bar's own
container query already used (N-07). `search.js` and `datepicker.js` swap their
39.99rem media strings for `upTo('medium')`, so the full-screen search view and
the modal date picker end at 600px, not 640px.
The time picker's landscape layout stops keying on width at all: M3 swaps it on
orientation and viewport height, so it is now landscape plus a window too short
for the upright dial (35rem, the dialog's own height), and the two dial-shrink
rules key on height alone.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
b1642aed1c
commit
17723d2a76
@@ -4,11 +4,11 @@
|
||||
* Focus or a press on the bar opens the view; Escape, the back arrow, a press outside, focus
|
||||
* leaving the search, or choosing a result closes it. ArrowDown from the input moves into the
|
||||
* results and the arrow keys walk them; ArrowUp past the first result returns to the input. On a
|
||||
* compact window (below `sm`) the view is full screen and modal: focus stays in it and the page
|
||||
* behind does not scroll. The results themselves are the caller's, rendered by Livewire into the
|
||||
* view as the query changes.
|
||||
* compact window (below `medium`, 600px) the view is full screen and modal: focus stays in it and
|
||||
* the page behind does not scroll — M3 docks the view from medium upwards. The results themselves
|
||||
* are the caller's, rendered by Livewire into the view as the query changes.
|
||||
*/
|
||||
const COMPACT = '(max-width: 39.99rem)'
|
||||
import { upTo } from './breakpoints.js'
|
||||
|
||||
const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
||||
|
||||
@@ -26,7 +26,7 @@ document.addEventListener('alpine:init', () => {
|
||||
closedAt: -Infinity,
|
||||
|
||||
init() {
|
||||
const query = window.matchMedia(COMPACT)
|
||||
const query = upTo('medium')
|
||||
|
||||
this.compact = query.matches
|
||||
query.addEventListener('change', (event) => (this.compact = event.matches))
|
||||
|
||||
Reference in New Issue
Block a user