michaelmawhinney / elementary

a lightweight, pure-css, single-element icon set for modern browsers
https://git.io/elementary
MIT License
0 stars 0 forks source link

remove regex selectors #36

Closed michaelmawhinney closed 7 years ago

michaelmawhinney commented 7 years ago

linting shows the following performance warnings: Attribute selectors with ^= are slow! Unqualified attribute selectors are known to be slow. e.g. [class^="e-"] {

maybe replace these regex selectors with explicit class names

michaelmawhinney commented 7 years ago

"Unqualified attribute selectors are known to be slow." to fix, we can define a specific element type to use for the icons and explicitly define it: old: [class^="e-"] new: span[class^="e-"]

michaelmawhinney commented 7 years ago

issue of unqualified attribute selectors resolved with #39

michaelmawhinney commented 7 years ago

the unqualified attribute selectors issue is automatically resolved if you fix the regex selector issue. instead of using [class^=e-], we can simply list each class explicitly

michaelmawhinney commented 7 years ago

removing regex gives better performance at the cost of minimal bytes. removed regex selectors with #44 .