css: Explode dark theme disabled rule.

This replaces a :disabled selector with individual ones for each
element type; I verified in CSS selector profiling that this change
removes lines that were previously about 10% of profiled CSS selector
processing time for rendering the combined feed.

The reason being that the rendered elements have very few disable-able
elements, but the browser was spending a lot of time trying to match
**every** element for whether it might have been disabled, which was
slow.

This probably reflects a browser bug.

(cherry picked from commit e4567e05ac)
This commit is contained in:
Tim Abbott 2024-08-13 22:42:23 -07:00
parent 9c4d573da3
commit a940c91e2d
1 changed files with 7 additions and 2 deletions

View File

@ -342,8 +342,13 @@
color: inherit;
}
/* these are converting grey things to "new grey" */
:disabled,
/* these are converting grey things to "new grey".
:disabled rules are exploded for CSS selector performance reasons. */
button:disabled,
option:disabled,
select:disabled,
textarea:disabled,
input:disabled,
input:not([type="radio"]):read-only,
textarea:read-only,
#organization-permissions .dropdown-widget-button:disabled,