4 ms·
Can you share a snippet or link to a repl showing how I can use `peer-` to make the label below have a gray text color when the input sibling is disabled? ```
by gmaster1440 2y ago
Can you share a snippet or link to a repl showing how I can use `peer-` to make the label below have a gray text color when the input sibling is disabled?
```
<label for="email">Email</label>
<input disabled id="email" type="email" />
```
- ezekg 2y agoI don't use Tailwind but this is easy with CSS: label:has(+ input:disabled) { color: gray; } Not sure why Tailwind couldn't do this.
- gmaster1440 2y agoAh, I see. May simply be the case then that `:has()` is relatively new and it wasn't possible prior to it's general availability as recent as Dec 2023.