StefanKovac / flex-layout-attribute

HTML layout helper based on CSS flexbox specification —
http://progressivered.com/fla/
MIT License
712 stars 57 forks source link

Attribute selector performance over class selectors #6

Closed 7ammer closed 8 years ago

7ammer commented 8 years ago

I really like the concept of this library! Traditionally though attribute selectors have been known to be a lot slower than classes as they are universal selectors. I'm curious, have you done any performance tests to see if there is a big difference?

StefanKovac commented 8 years ago

@7immy I haven't done any performance test, but you are right, universal selectors are slower than class selectors. However, nowdays browsers are really good at CSS parsing and you are unlikely to notice any difference in speed if you dealing with regular web projects. I guess some speed differences may be noticeable in test environments when you are dealing with tens of thousands of selectors at once.

Do you know any reliable way of testing CSS selector performance?