Let's take a look at the example that the Tailwind documentation gives of how NOT to write your classes.īecause of the way that the regex rule works that is used to detect the CSS classes, it will detect strings that aren't separated by spaces, quotes or angle brackets. vue.īut, it's really important to make sure that you write your styles in your markup in a way that can be preserved. These lines allow us to preserve any CSS classes that are found in any files inside our resources folder that end with. If you're interested in reading more about why Tailwind is useful, Adam Wathan (the creator of Tailwind) has a really interesting article about it that I'd recommend reading.Īs you can see, we've added three new lines to the purge section of the file. But with Tailwind, if I wanted to quickly add a style to a button, it was as easy as adding it straight to the HTML. It was great for throwing together sites really quickly, but to tailor them to my own liking, I had to override a lot of styles. When I was using Bootstrap, I always felt like I was fighting the built-in CSS styles to get anything done. Of course, it felt a little bit weird at first, but after an hour or two it felt really natural to use. But, I gave it a try anyway so that I could make a more informed decision. I just thought that it was a bit of a fad that would probably die down after a few months. I thought the same thing when I first started using Tailwind. The Bootstrap version looks so much better and easier to understand!". "That HTML looks really messy and overcomplicated. Now, don't worry, I know what you're thinking. As you can see, we're adding individual CSS classes to the markup, rather than having one or two classes like you would in Bootstrap.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |