![]() ![]() You have to jump between multiple files to make changes - which is a way bigger workflow killer than you’d think before co-locating everything together.You have to think up class names all the time - nothing will slow you down or drain your energy like coming up with a class name for something that doesn’t deserve to be named.If you start using for everything, you are basically just writing CSS again and throwing away all of the workflow and maintainability advantages Tailwind gives you, for example: Making changes in a project that has tons of custom CSS is worse. Yes, HTML templates littered with Tailwind classes are kind of ugly. Whatever you do, don’t use just to make things look “cleaner”. Changing the font-size for every instance is just as easy as it is with CSS, but now you can turn all of the titles into links in a single place too. Sure you can update the font-size for every instance in a single place, but what if you need to turn the title into a link?Ĭomponents and template partials solve this problem much better than CSS-only abstractions because a component can encapsulate the HTML and the styles. chat-notification Įven if you create classes for the different elements in a component like this, you still have to duplicate the HTML every time you want to use this component. Contributors 204 + 198 others ĭon’t panic! In this guide, you’ll learn about different strategies for reusing styles in your project, as well as best practices for when to employ each one. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |