Hacker News new | past | comments | ask | show | jobs | submit login

Some people are saying “user styles let you do this”, but it’s not actually true: take a textarea, for example; if you set its background-color, the browser discards its regular textarea appearance (which might have a special border colour and style and radius) and leaves you with what’s actually specified. Expressed very approximately, adjusting various properties implies `appearance: none`.

And you can’t get it back. `background-color: initial`? Nope, no native appearance. `appearance: textarea !important`? No go. `background-color: f(env(x))` (a stupid way of getting a runtime-invalid value due to a bad spec, see https://github.com/w3c/csswg-drafts/issues/3792 for details)? Nada.

You could provide your own styles for form elements, but you can’t use user styles to retain native form element styling.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: