3 ms·
sorry, but this is just not true. The cascading issue is still there, and it gets even worse because if you have an element with class "p-1 p-0" you cannot know
by agos 2y ago
sorry, but this is just not true. The cascading issue is still there, and it gets even worse because if you have an element with class "p-1 p-0" you cannot know in advance which will take precedence.
Of course you shouldn't do that, but it happens to be the case that Phoenix does exactly that
- ahofmann 2y agoThis is not a cascading issue. This is a "You're holding it wrong" issue. And when Phoenix does write 'p-0 p-1', Phoenix and Tailwind are not a good match.
- Lockal 2y agoYou suddenly reminded me about another good Tailwind thing: linter will highlight "p-1 p-0" as a mistake. I've never seen linters that warn on "your-custom-p1 your-custom-p0", but Tailwind makes it possible.
- isleyaardvark 2y agoIf the alternative is: .foo { padding: 0; padding: 1rem; } then I can see the precedence but I don’t see how it’s an advantage. You can write bad code in any methodology. That seems like an issue with Phoenix and not Tailwind or the Tailwind approach.