Keep a closed standard side sheet out of its row from the first paint
A closed standard sheet is `inline-size: 0` with a negative margin as wide as its row's gap, but the view writes that gap (`--md-drawer-gap`) and `data-md-drawer-collapsed` only once Alpine runs. Until then each closed sheet was a zero-wide flex item that still cost the row one gap, and a sheet bound to an open Livewire property had no width at all, so the content beside them changed width when the script started - two closed sheets beside a column made it 48px narrower, then it jumped. Until the view has settled, drawer.css now takes a standard sheet that is not `data-md-open` out of the layout, and the view renders `data-md-open` on a standard sheet whose `wire:model` property is open (truthy as Alpine reads it), so it stands at its width from the first paint. Transitions still wait for `data-md-drawer-settled`. A browser test measures a column beside two closed sheets (one bound to Livewire, one to Alpine) and an open one before Alpine starts and once settled; it fails without the change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
207270a23d
commit
a6dc213e67
@@ -54,6 +54,12 @@
|
||||
under an installed app's status bar as the page scrolls; inside `<x-scaffold>` it also sticks
|
||||
under a sticky `<x-app-bar>` in the `top` slot, which covered it. It is as tall as the window
|
||||
below that, and every side sheet keeps the bottom safe area inside its bottom padding.
|
||||
- **A standard `<x-drawer>` takes its place from the first paint.** Until Alpine started, a closed
|
||||
standard sheet was a zero-wide item that still cost its row one gap, and a sheet bound to an open
|
||||
Livewire property had no width yet, so the content beside them changed width when the script
|
||||
ran. A standard sheet is now out of the row until then, and one whose `wire:model` property is
|
||||
open is rendered open and stands at its width. One opened from an Alpine scope alone still
|
||||
appears when Alpine starts, which only the script can know.
|
||||
|
||||
## From 2.0.0 to 2.1.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user