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

Instead of repeating "d-flex justify-content-center..." everywhere is it possible to define that once and inherit those properties in Tailwind?



Definitely, you can still add custom classes where it is the best solution, such as a reusable layout.

EDIT: Instead of custom CSS classes, Tailwind recommends extracting components like the other commenter pointed out. https://tailwindcss.com/docs/extracting-components




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

Search: