From cf63f11bfb7fd64596bc7bd3696c87d3ab0331f0 Mon Sep 17 00:00:00 2001 From: Andreas Reinhold / reini Date: Thu, 17 Sep 2026 06:55:36 +0200 Subject: [PATCH] Keep a switch's track whole beside long text in a row `[data-md-toggle] { min-width: 0 }` let the switch's root shrink below its 52px track as a flex item. In `` beside a paragraph, flex shrinking weighs each item by its width, so the root of a bare switch gave up a share of its 52px, and a switch with a long label of its own gave its label a column one word wide and less; the track, which does not shrink inside the root, ran out of it and past a card's edge on a phone. ``'s root did the same with its box. Both roots now keep their automatic minimum, the control and, beside a label, its longest word, so the text beside the control, or the control's own label, wraps instead. The toggle's docblock and the skill say so. A browser test lays a bare switch, a labelled switch and a bare checkbox beside long text in rows on a 393px window and checks each control's size and that it stays inside its row, and that the switch's own label wraps inside its root; it fails without the change in Chrome, Firefox and Safari. Co-Authored-By: Claude Opus 5 (1M context) --- UPGRADE.md | 6 +++ .../livewire-material-development/SKILL.md | 1 + resources/css/components/checkbox.css | 4 +- resources/css/components/toggle.css | 7 ++- resources/views/components/toggle.blade.php | 4 +- tests/Browser/FieldsTest.php | 50 +++++++++++++++++++ 6 files changed, 69 insertions(+), 3 deletions(-) diff --git a/UPGRADE.md b/UPGRADE.md index 4a73f69d..d7211793 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -68,6 +68,12 @@ wire:ignore>` holding ``, the browser's copy of the chosen option, which select.css cuts; a browser without the customizable select never renders it. A test that matched a select's markup up to its first `