Ensure arrow doesn't change on disabled <select>

We can't just modify the CSS variable here, since that is also used in
the style for :disabled. We need to change the entire "background-image"
in order for :disabled to be able to override it.
This commit is contained in:
Samuel Mannehed 2022-12-14 13:58:49 +01:00
parent f983c78d17
commit 6d7d45ba08
1 changed files with 2 additions and 2 deletions

View File

@ -68,13 +68,13 @@ select {
https://bugzilla.mozilla.org/show_bug.cgi?id=1805406 */
select:active {
/* Rotated arrow */
--select-arrow: url('data:image/svg+xml;utf8, \
background-image: url('data:image/svg+xml;utf8, \
<svg width="8" height="6" version="1.1" viewBox="0 0 8 6" \
xmlns="http://www.w3.org/2000/svg" transform="rotate(180)" > \
<path d="m6.5 1.5 -2.5 3 -2.5 -3 5 0" stroke-width="3" \
stroke="rgb(31,31,31)" fill="none" \
stroke-linecap="round" stroke-linejoin="round" /> \
</svg>');
</svg>'), var(--bg-gradient);
}
option {
color: black;