tailwindlabs / discuss

A place to ask questions, get help, or share what you've built with Tailwind CSS.
MIT License
171 stars 9 forks source link

Use Tailwind for specific design (every pixels are important) #286

Closed Jimmylet closed 5 years ago

Jimmylet commented 5 years ago

Hello,

I do not use a css framework. I use an OOCSS style architecture with BEM classes.

I integrate designs that I make to measure for my clients. Designs quite advanced technically and graphically.

I never thought of using a framework. Something like Bootsrap would not be suitable for my use. I do not need any preconceived components, they are all different from one project to another, or almost.

But, browsing the web to learn more about the frameworks css (I'm still curious), I came across Tailwind. The utility first approach makes me a little scared but I only ask to try. And if it falls, I would be convinced.

Only, as my designs are very personalized, I'm afraid of one thing: values ​​for sizes.

I see that we can add padding (px-4, for example) or a height (h-64). These values ​​are predefined. And it scares me.

When I have a 13px padding in my design, it's 13px, not 14px, not 12px, but 13px.

Like for the height. It is calculated to the nearest px. And it does not trade.

So, is Tailwind still done for me? How to overcome this problem? How do you do ? The ideal would be to be able, by adding a class px-13, that the padding is 13px. I know I can change everything, but if I have to start adding new classes for each different padding, I'm still here in a month.

thanks for your advices

PS: sorry for my english, it's not my mother tongue.

tlgreg commented 5 years ago

You can customize the spacing, sizing and many other values to your liking. You can also use px values if that's what you want.

Not sure what you read so far, but this is done through configuring the tailwindcss build. Configuration: https://tailwindcss.com/docs/configuration Installation (you can't customize if you use the CDN build): https://tailwindcss.com/docs/installation But it's best if you at least skim through most of the pages in docs.