Skip to content

Retire two more !important rules and share draw mode's crosshair - #4324

Merged
max-sixty merged 1 commit into
mainfrom
important-audit
Oct 27, 2026
Merged

max-sixty merged 1 commit into
mainfrom
important-audit

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

A follow-up to #4302, from a second review of the !important rules it kept. Two more go, and draw mode's crosshair becomes one rule instead of two. Nothing visible changes.

  • Quoted playground. initial/lf-playground.js sets hidden on a quotation's controls, its presets and the boxes that held only controls. Leaf's [hidden] rule already beats any display the page states, so the important class rule in widgets.css and its lf-playground-control-box marker are gone.
  • Forced colours. The Leaf mark's state tones are .lf-dot:where(.working) and so on, which match the same elements as .lf-dot.working but add no specificity. The forced palette's later .lf-dot rule now replaces every tone on order, without !important.
  • Draw mode. integration.css already reached shadow trees through a style query on --lf-draw-mode. That sheet also reaches the document, so dropping :host from its selectors lets one rule serve both, and chrome.css keeps only region capture's crosshair.
  • Comment. The startup layer's comment in theme.css now says the layer is first inside lf-base, not first in the theme.

Computed styles for every element, shadow trees included, match main on 13 corpus pages in Chromium and 3 in Firefox, in screen, draw mode and print. The mark's tones match under forced colours. The quoted-playground and draw-mode browser tests pass, apart from test_draw_mode_leaves_chrome_controls_usable, which times out waiting for .lf-fp-on-user on main too.

This was written by Claude Code on behalf of @max-sixty

A quoted playground hides its controls, presets and the boxes that held only
controls with the hidden attribute, which the theme's [hidden] already makes
outrank any display the page states; the important class rule is gone.

The Leaf mark's state tones add no specificity (.lf-dot:where(.working)), so the
forced palette's later rule replaces each tone without importance.

Draw mode's crosshair is one rule for the document and every shadow tree: the
style query integration.css already ran for shadow trees now also serves the
document, and chrome.css keeps only region capture's crosshair.

The startup layer's comment now says where the layer sits: first in lf-base.

Computed faces match HEAD on 13 corpus pages in Chromium and 3 in Firefox, in
screen, draw and print; the mark's tones match under forced colours.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@max-sixty
max-sixty merged commit 4c64952 into main Oct 27, 2026
4 checks passed
@max-sixty
max-sixty deleted the important-audit branch October 27, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants