Avoid relative color syntax in login stylesheet - #306
Merged
Merged
Conversation
Applications that still bundle sassc-rails get Sprockets' SassC css_compressor, which re-parses our already-minified build output as SCSS. libSass resolves hsl() and rgb() to its own builtins and aborts on the relative color form, so precompiling assets fails for those hosts. color-mix() expresses the same 50% alpha and is unknown to libSass, so it passes through untouched while staying valid modern CSS with wider browser support than relative colors.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #306 +/- ##
=======================================
Coverage 98.58% 98.58%
=======================================
Files 11 11
Lines 283 283
=======================================
Hits 279 279
Misses 4 4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
tvdeyen
enabled auto-merge
September 3, 2026 08:55
tvdeyen
disabled auto-merge
September 3, 2026 08:55
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
tvdeyen
added a commit
that referenced
this pull request
Sep 3, 2026
[8.4-stable] Merge pull request #306 from AlchemyCMS/fix-login-css-relative-color
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applications that still bundle
sassc-railsfail to precompile assets since we started shipping the login styles as pre-built CSS. Sprockets installs the SassCcss_compressorwhenever that gem is present, and it re-parses our already-minified build output as SCSS. libSass resolveshsl()andrgb()to its own builtins, so the relative color form in.logo-boxaborts the whole precompile withFunction hsl is missing argument $saturation.color-mix(in srgb, ... 50%, transparent)expresses exactly the same 50% alpha —color-mixinterpolates premultiplied, so mixing withtransparentonly touches the alpha channel. libSass has no builtin of that name and passes it through untouched. It is also better supported in browsers than relative colors (Baseline 2023 vs. Safari 16.4 / Firefox 128), so this is not a compatibility regression.Worth noting that this only avoids the one construct that currently trips libSass rather than preventing the class of problem: a future relative color, or even a plain space-separated
hsl(200 50% 50%), would break these hosts again the same way. The structural fix belongs in alchemy_cms, whoseAlchemy::Sprockets::SkipBuildsCompressionalready skips compression for pre-built CSS but hardcodes its own engine root and so never covers this gem'sapp/assets/builds.