Re:Native HTML elements with CSS superpowers
by dubcanada on Monday June 15, 2020 @11:09AM
(#23528081)
I mean you are right, but there are certainly selectors which are "faster" just the faster part is more on the 0.000001ms level than any measurable level.
Also I am fairly certain (been a while since I spent time in Webkit source) but class name and attribute selectors are implemented the same, if you want to do a proper benchmark you would want to do id, nested selectors, attributes, class, etc. And at that level you will find a significant difference.
Re:Native HTML elements with CSS superpowers
by wilsonrocks on Monday June 15, 2020 @11:15AM
(#23528153)
I could see the point in attribute selectors - when using react I find it messy to programmatically specify class names based on state/props, particularly when using BEM.
Setting some Booleans as attributes is much nicer. However, it is built into CSS already, so not sure a library would help...
Agree with the rest of the stuff you've said though. I just don't see a place for this library.