08
Jul
This article was originally published on Rails Designer This is another quick article about something I use in every (Rails) app. I often apply a few Tailwind CSS utility-classes to create smooth transitions for hover- or active-states. I use this one so often that I create a custom smoothTransition class. So instead of writing transition ease-in-out duration-200 I write smoothTransition. Much smoother! Typically you'd write a CSS selector within the @layer utilities directive, like so: @layer utilities { .smoothTransition { transition-property: all; transition-timing-function: ease-in-out; transition-duration: 200ms; } } Enter fullscreen mode Exit fullscreen mode And this would certainly work just…