-
-
Notifications
You must be signed in to change notification settings - Fork 315
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
Precompile CSS files into Gem #2886
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2886 +/- ##
=======================================
Coverage 95.96% 95.96%
=======================================
Files 232 232
Lines 6272 6272
=======================================
Hits 6019 6019
Misses 253 253 ☔ View full report in Codecov by Sentry. |
Is there something that I could do to help this PR to be merged? |
@afdev82 We still need to decide on how we build and ship the compiled assets w/o using the host app for compilation. If you have any idea I would love hear from it |
Sass maintains a global namespace. If we want to be able to have a frontend "alchemy/elements" import we would introduce conflicts.
We dont want to use Sass indented syntax in our project
This file should never be compiled on its own
Normal Sass is not able to import with wildcards, while sass-rails added this functionality.
This is the modern replacement for sassc-rails that uses the Dart implementation instead of libsass.
These files are already processed and do not contain any Sass specific code
And serve them via Sprockets
We already have prebuild files that we can just serve via Sprockets.
We do not compile them via Sprockets anymore.
The print styles are loaded in its dedicated file and must not override the admin styles.
We cannot expect a preprocessor in the host app
- Error: Silent comments aren't allowed in plain CSS. - Deprecation warning: Values without unit not allowed - Fix calc usage in tables padding
@afdev82 so, I took some time today to rebase this with latest main. Local testing looks promising. Do you mind to test this branch in your app and provide feedback? Thanks |
9c01b43
to
da9ba71
Compare
In order to solve undefined method `parse' for Psych::Parser errors while installing sass-embedded.
Hi, thank you.
Yes, that's exactly what I am doing in my app 😆 |
Kind of, but you would need to inject that Thanks for checking out. |
Yes, it's not a big deal I think. If I want to overwrite a style in all views, I could also overwrite the admin layout to include the file there. With updates it's not ideal, but I don't think there will be much going on in the admin layout file. |
If this works: amend me
@afdev82 just merged into main. Make sure to update your Gemfile |
What is this pull request for?
Check in compiled CSS in the gem and do not compile the Sass assets within the context of the host app anymore.
Notable changes
Removes the
sassc-rails
dependency 🥳This also removes the ability to add additional
.scss
files into the admin css bundle, as well as to overwrite Sass variables.But this is probably a rare use case anyway and the pros outweigh the cons here.
TODO
bin/start
command.body
scope)?Checklist