79427658

Date: 2025-02-10 16:14:05
Score: 1
Natty:
Report link

2025: A cool new way to colour the "placeholder" option using the modern :has() pseudo class.

<select>
    <option class="placeholder">Please select something</option>
    <option>Select me</option>
</select>
select:has(option.placeholder) {
    color: red;
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Jeff Chi 杰夫迟