Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But this isn't much different than:

<Button class=`border text-gray ${override}`/>

<CalloutButton /> extends <Button override="text-blue" />

I'd argue you have less markup to write overall if you are modularizing component logic/styling



One gripe I have with tailwind, is overriding styles is difficult. The .text-blue style will only override .text-gray if it is declared later in the css document.

for example if the corresponding css file is this: .text-blue { color: blue; } .text-gray { color: gray; }

Then in your above example, both Button and CalloutButton will have gray text because .test-gray has higher specificity than .text-blue


The difference is that your website will be much larger and won't work without JavaScript.


And what about your :hover, ::before etc, where do you put those? (genuinely curious)






Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: