-
Notifications
You must be signed in to change notification settings - Fork 21.9k
Remove default reliance on Sass and CSS generators #43110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
New world, new CSS frameworks, new needs.
But continue to make it easy to add.
Co-authored-by: Kevin Newton <kddnewton@gmail.com>
I'm all for taking sass out as a default, but putting Tailwind in as a suggestion is deeply concerning to me. There are numerous articles about the failings and problems regarding the philosophy of Tailwind and "utility class"-driven HTML markup…I wrote one of the most widely shared ones: https://dev.to/jaredcwhite/why-tailwind-isn-t-for-me-5c90 Perhaps the Gemfile could link to a Rails Guide that offers pointers to various CSS frameworks. At this PR stands, it appears that Rails is officially endorsing Tailwind. Yikes. |
The Rails Doctrine is that the menu is omakase, not a buffet: https://rubyonrails.org/doctrine/#omakase. This means offering one default setting or suggestion, but allowing substitutions. A Rails Guide pointer that presents various CSS frameworks doesn't jive with that. But yes, utility-style CSS is not everyone's flavor. Nor is Hotwire. Nor is minitest. Nor is even Active Record! Rails will continue to make it easy for those who don't like the defaults to change them, and continue to pick defaults for those who are happy to flow with an omakase menu ✌️ |
Thanks for the reply, and while I'm not thrilled with the outcome I appreciate the logic behind it. ✌️ |
I love this direction (I'm a fan of Tailwind), but I'm concerned that this was merged into main without soliciting input from anyone, especially the Rails core team. |
Love it! |
Sad to see Sass not coming as default. The killer feature for me is nested syntax, it's a shame CSS still doesn't support it. |
|
the dart saas compiles to javascript, so I don't see why not using it |
Does this mean that Tailwind is becoming the Rails recommendation/supported option? I hadn't noticed until now that there was a I do see that at least current version of this PR as I look at it now, will generate a Gemfile with (commented-out) options for both If there is a single Rails "omakase" choice, it would probably be good to make sure it's clearly documented/announced, as that tends to be the 'safest' choice to use with Rails -- as Rails core team generally does the work to make sure it keeps working, unlike other "non-omakase" options, which I guess is what "omakase" means for Rails actually. (I use SASS, and probably won't stop, so hope it keeps working painlessly. But I don't use the per-model stylesheets and haven't in some time, so am quite content to see the generator code for those go. That is of course the bulk of this PR, and I haven't seen anyone say they'll miss that yet! The actual contents of the PR seem actually uncontroversial, people are just worried about possible increased pain to using SASS, since many use it and like it. The consequences of switching an "omakase" choice people have gotten used to are perhaps greater than the restaurant menu analogy, where you don't have to maintain or upgrade your past meals. :) ). |
Since rails#43110, we no longer generate `.scss` files by default. This commit: * Changes remaining `.scss` filenames to `.css`. * Updates the instructions for omitting the default Trix styles. * Eliminates repetitive use of the word "default". * Reorders the content slightly for better flow.
Since rails#43110, we no longer generate `.scss` files by default. This commit: * Changes remaining `.scss` filenames to `.css`. * Updates the instructions for omitting the default Trix styles. * Eliminates repetitive use of the word "default". * Reorders the content slightly for better flow.
Modern web applications are more likely than not to use a CSS framework like Tailwind, Bootstrap, or Bulma. Rails shouldn't be generating per-model stylesheets as though we were still writing everything by hand.
Also, Sass has chosen to focus exclusively on dart-sass, which requires all manner of dependencies that Rails won't adopt by default. So decrease our reliance on Sass, and move it to being an optional extra.