Are the classes in the stylesheet generated by the CLI listed in the recommended class order? #10343
-
|
I know there is a recommended class order when writing classes for an element. And of course the CLI generates a stylesheet which contains classes among other things. I was wondering whether the stylesheet's classes are in the recommended class order? Many thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Hey! Yep we have an internal order and we have some places where we explicitly sort everything (e.g.: screen variants are ordered based on value, variants have a defined order and stacked variants always combine the variants). In fact, our prettier plugin uses this exact same order we use internally to format and sort your classes in your templates. A small caveat: sometimes the order is not determenistic but based on the order they first appeared in. However, those don't really matter in real world examples. E.g.: Hope this helps! |
Beta Was this translation helpful? Give feedback.
Hey!
Yep we have an internal order and we have some places where we explicitly sort everything (e.g.: screen variants are ordered based on value, variants have a defined order and stacked variants always combine the variants). In fact, our prettier plugin uses this exact same order we use internally to format and sort your classes in your templates.
A small caveat: sometimes the order is not determenistic but based on the order they first appeared in. However, those don't really matter in real world examples.
E.g.:
bg-red-500andbg-green-500, there is not order or hierarchy attached to these values. If you look atpl-4, this will always win frompx-4which will always win fromp-4.Hope …