#170 Maintainable Buttons CSS
Please, don't abstract button CSS into a component! It leads to suffering. Don't do this: https://github.com/baoagency/polaris_view_components/blob/main/app/components/polaris/headless_button.rb
Using inline styles for buttons with Tailwind is also a bad option, because it can be hard for you to update the component everywhere in your app at once.
CSS abstractions with an API similar to Boostrap should be just enough: https://getbootstrap.com/docs/5.3/components/buttons/#sizes
Episode source code: https://github.com/corsego/138-tailwind-layout/commit/2cd22a45bbed2c79ece73cb7726c4a181ddff5ba
Based on this blogpost: https://blog.corsego.com/tailwindcss-buttons
1
Featured in playlists
Stop copypasting CSS and Javascript UI elements!
Learn to write your own!
Really, there are like 50 classes that you need to remember and you're set for life!