Directive grouping syntax feels like a footgun #59
Replies: 2 comments 1 reply
-
You are not wrong. In our opinion it has great advantages in reducing the class name noise. As with any language you can make it too complicated. For example i really like As with a lot of things there will be preferences. You can use twind in the classic tailwind way and introduce grouping very sparingly. Maybe we should find better examples for the docs and add a hint/warning to not obscure the intention. |
Beta Was this translation helpful? Give feedback.
-
@itsMapleLeaf Could you take a look at the new Thinking in Groups (added by @gojutin)? Does this help or should we add something more? |
Beta Was this translation helpful? Give feedback.
-
Just a general thoughtdump. I looked through the grouping syntax docs, and when I look at this:
...especially the latter part
offset(4 pink-200)
, I see a drastic decrease in clarity as to what's actually going on here. It reminds me of, and has the same downsides as nested blocks in CSS and Sass; looking at any individual part of the style in a vaccuum, it's harder to "trace" up the tree to see what styles are being applied. It feels very "write only", and I can only imagine this issue getting worse with more complex examples.Maybe it's just unfamiliarity bias on my part, but I feel like the terseness of this doesn't outweigh the readability barrier, almost to the point that it shouldn't be included in the library at all. What do you think?
Beta Was this translation helpful? Give feedback.
All reactions