Hey folks, Chris here from Skeleton. Love what you've done with sv. It's made a million times easier for Skeleton uses to install SvelteKit + Tailwind. We're so thrilled that this is now available to the community!
That said, we have had our own in-house CLI for a while that recommends the same few official Tailwind plugins. However, I want to share some observations and recommendations from our experience.
Available Plugins
Here's the four plugins available:
Typography - provides a mechanism for styling content you don't own; such as blog or CMS data
Forms - normalizes HTML form elements to provide a clean reset cross-browser
Aspect Ratio - a "polyfill" for providing CSS aspect ratio to legacy browsers
Container Queries - a new plugin for supporting Container Queries; which will likely fold into the core in the future
While these plugins are optional, of the ones I listed - Typography, Forms, and Container Queries all have great modern day application. They serve a select purpose, but do that well.
The Problem
The problem is the Aspect Ratio plugin. From their own readme:
Tailwind CSS v3.0 shipped with native aspect-ratio support, and while these new utilities are great, the aspect-ratio property isn't supported in Safari 14, which still has significant global usage. If you need to support Safari 14, this plugin is still the best way to do that.
You might note that readme was last updated around 2 years ago. So Safari's "significant global usage" is has now dwindled down to 0.18% according to caniuse. And in fact, I'd go so far to say it's detrimental to recommend in modern Tailwind applications. Many users will just blindly install all plugins without a second thought if they are needed or not.
I have helped a number of folks in our community troubleshoot why certain features were not working as expected, both in and outside of Skeleton, only to realize this plugin was the cause. It takes precedence over the native implementation of aspect- utility classes and does not mirror it's implementation. Classes like aspect-square will fail outright.
Proposal
What I'm proposing is this specific plugin be removed from the recommendations in sv. Keep in mind it is still easily installed with a single package command for those that need it. This would just help protect folks from implementing it, especially when the vast majority no longer have need of it.
Hey folks, Chris here from Skeleton. Love what you've done with
sv
. It's made a million times easier for Skeleton uses to install SvelteKit + Tailwind. We're so thrilled that this is now available to the community!That said, we have had our own in-house CLI for a while that recommends the same few official Tailwind plugins. However, I want to share some observations and recommendations from our experience.
Available Plugins
Here's the four plugins available:
While these plugins are optional, of the ones I listed - Typography, Forms, and Container Queries all have great modern day application. They serve a select purpose, but do that well.
The Problem
The problem is the Aspect Ratio plugin. From their own readme:
You might note that readme was last updated around 2 years ago. So Safari's "significant global usage" is has now dwindled down to 0.18% according to caniuse. And in fact, I'd go so far to say it's detrimental to recommend in modern Tailwind applications. Many users will just blindly install all plugins without a second thought if they are needed or not.
I have helped a number of folks in our community troubleshoot why certain features were not working as expected, both in and outside of Skeleton, only to realize this plugin was the cause. It takes precedence over the native implementation of
aspect-
utility classes and does not mirror it's implementation. Classes likeaspect-square
will fail outright.Proposal
What I'm proposing is this specific plugin be removed from the recommendations in
sv
. Keep in mind it is still easily installed with a single package command for those that need it. This would just help protect folks from implementing it, especially when the vast majority no longer have need of it.Thanks for the consideration!