Repository navigation
Drop the root :has() that restyled the app on every change - #429
Merged
Merged
Conversation
app.css hid the scrollbars behind an open dialog on Linux with html:has([role="dialog"][data-state="open"]). A :has() on the root makes WebKitGTK re-check it against the whole document on every DOM change anywhere, so typing, scrolling the grid or streaming rows all paid for it. dialog-open.js sets data-dialog-open on <html> while a dialog is drawn, ref-counted for nested dialogs. DialogContent and ConnectionModal set it from their content element's ref, which bits-ui clears on close, so a dialog that is mounted but closed does not hold it. The rule keys on the attribute instead. The root's text-rendering goes from optimizeLegibility to auto, which keeps WebKit on its fast text path. font-kerning and the kern/calt features are set explicitly, so kerning does not change. The non-subject :has() lint now also catches a pseudo-class after the :has() group.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Linux, app.css hid the scrollbars behind an open dialog with
html:has([role="dialog"][data-state="open"]). A root:has()makes WebKitGTK re-check it against the whole document on every DOM change, so typing, grid scrolling and streamed rows all paid that cost.src/lib/dialog-open.jssetsdata-dialog-openon<html>while a dialog is drawn, ref-counted for nested dialogs.DialogContentandConnectionModaldrive it from their content element'sref, which bits-ui clears on close. A mounted but closed dialog doesn't hold it.text-renderinggoes fromoptimizeLegibilitytoauto, which keeps WebKit on its fast text path. Kerning is set explicitly throughfont-kerningandfont-feature-settings, so it's unchanged.:has()lint test also catches a pseudo-class after the:has()group.Last PR in this group with #427 and #428, so it carries no
release:skipand bumps the version.Checked in the desktop app on Linux: the attribute is off at rest, on with Settings open, and off again after Escape. Design lint, both vitest suites (2011 + 20) and
npm run buildpass.