I’m successfully selecting a user avatar using this neat has selector:
ul.remaining [data-avatar-for-person-id="44220253"] {
width: 40px !important;
height: 40px !important;
}
Is it possible to use the has selector to select the parent li for this todo?
I’m trying like this, but its not being applied to the element – at all, not just because of specificality.
li:has(img[data-avatar-for-person-id="44220253"] ) {
font-size: 1.05em !important;
color: black !important;
}
the image is burried down in some divs and spans within the li.
I’m using firefox, but have enabled the experimental feature:
2
Answers
According to caniuse i needed to enable the feature for firefox current version (118)
So I visted
about:config
and searched for has-selector and setAnd now my custom stylesheet works, enabling me to highlight todos assigned to me in basecamp 4. yay.
The
:has
selector works for me in Chrome. If this isn’t working for you in Firefox, make sure you have the latest version, check that the feature is enabled, restart Firefox then check to make sure it’s still enabled.