3 ms·
See my reply below: https://news.ycombinator.com/item?id=33289468 https://news.ycombinator.com/item?id=33289468 If you were able to style the element with "cla
by lbotos 4y ago
See my reply below: https://news.ycombinator.com/item?id=33289468 https://news.ycombinator.com/item?id=33289468
If you were able to style the element with "classic" CSS primitives like border/background/color would that not have also solved the problem without introducing new syntax with new quirks?
- easrng 4y agoI've done this before. The problem is a lot of elements will change to a different (standard?) appearance when you add styles like that, so you'd need to recreate the original look if you wanted to just change the color. Also, each browser has different psuedoelements so you have to support firefox and webkit separately, which is made worse by the fact that webkit doesn't support targeting multiple elements with your psuedoelement selector, ex. you can't do this: input[type="range"]::-moz-range-thumb, input[type="range"]::-webkit-slider-thumb { background-color: red; } It'll work in Firefox, but Chrome (and probably Safari) will ignore it. Instead you need to do this: input[type="range"]::-moz-range-thumb { background-color: red; } input[type="range"]::-webkit-slider-thumb { background-color: red; }
- alwillis 4y agoFor what it’s worth, having forms work the same across browsers is something Apple, Google and Mozilla are working on for Interop 2022: https://wpt.fyi/interop-2022 https://wpt.fyi/interop-2022
- easrng 4y agoLooks like they're mostly working on making the appearance property work the same across browsers, they aren't actually standardizing the shadow dom used to render the elements.