[Prettier Plugin] flex-1 injected between flex and flex-col? #16284
Unanswered
josefrichter
asked this question in
Help
Replies: 1 comment
-
Hi @josefrichter! Here are the basic rules for how classes are sorted. Regarding your example. It seems to me that this order is logical. I also checked if |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Suppose you have this
<div class="flex-1 flex flex-col>...</div>
Running Prettier reorders it to
<div class="flex flex-1 flex-col>...</div>
It doesn't seem to make sense to me:
flex-1
specifies behavior of this div within its parent (that is flex).flex flex-col
specifies properties of this div, that becomes another flex.It seems to me that behavior within parent should take precedence over other properties. Also
flex flex-col
are so closely related that they should probably always appear together. Andflex-1
in this case is completely unrelated. So why would it be injected in between?Also if you specify other properties like
gap-4
, it is actually placed before initiatingflex flex-col
, which also doesn't make much logical sense.What am I missing here, please?
Beta Was this translation helpful? Give feedback.
All reactions