You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've just started learning tailwind and I'm sorry if I missed something obvious, but one thing that immediately springs to mind when reading the docs is how the combination of multiple/long modifiers with multiple properties leads to excessive repetition. There were some discussions of the problem but, unless I missed something, the only proposed solution was some sort of grouping syntax, which led to a whole host of problems. So I'm thinking why not just introduce aliases for modifiers, so that this (taken from the docs):
Higher specificity of such selectors prevents conflicts when the alias name conflicts with a predefined modifier. Also, with consistent naming convention there shouldn't be too much of a "blow up" in size of generated css.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I've just started learning tailwind and I'm sorry if I missed something obvious, but one thing that immediately springs to mind when reading the docs is how the combination of multiple/long modifiers with multiple properties leads to excessive repetition. There were some discussions of the problem but, unless I missed something, the only proposed solution was some sort of grouping syntax, which led to a whole host of problems. So I'm thinking why not just introduce aliases for modifiers, so that this (taken from the docs):
becomes this:
where
focus:invalid::fi
introduces an aliasfi
,fi:ring-pink-500
uses it, and this is the generated css:Higher specificity of such selectors prevents conflicts when the alias name conflicts with a predefined modifier. Also, with consistent naming convention there shouldn't be too much of a "blow up" in size of generated css.
Beta Was this translation helpful? Give feedback.
All reactions