Skip to content

Seperate admin themes into CSS bundles#3379

Merged
tvdeyen merged 1 commit intomainfrom
more-css-bundles
Sep 18, 2025
Merged

Seperate admin themes into CSS bundles#3379
tvdeyen merged 1 commit intomainfrom
more-css-bundles

Conversation

@tvdeyen
Copy link
Copy Markdown
Member

@tvdeyen tvdeyen commented Sep 18, 2025

What is this pull request for?

With seperate theme files for light, dark and auto modes we are able to load the theme
we want into other admins (ie. Solidus) while still keep the bundles as small as possible.

The default alchemy/theme.css file includes both (dark and light) themes which
switch by preferred color scheme.

The dedicated alchemy/light-theme and alchemy/dark-theme can be loaded in situations
where you want that explicit theme.

Checklist

@tvdeyen tvdeyen added this to the 8.0 milestone Sep 18, 2025
@tvdeyen tvdeyen requested a review from a team as a code owner September 18, 2025 08:45
Copy link
Copy Markdown
Contributor

@sascha-karnatz sascha-karnatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Only the "build:css" command is very long.

@tvdeyen
Copy link
Copy Markdown
Member Author

tvdeyen commented Sep 18, 2025

Looks good! Only the "build:css" command is very long.

Yes. Unfortunately the Sass team refuses to create a config file 😞

@tvdeyen tvdeyen marked this pull request as draft September 18, 2025 10:06
@tvdeyen
Copy link
Copy Markdown
Member Author

tvdeyen commented Sep 18, 2025

I will build this a bit different after talking with @sascha-karnatz IRL

With seperate theme files for light, dark and auto modes we are able to load the theme
we want into other admins (ie. Solidus) while still keep the bundles as small as possible.

The default `alchemy/theme.css` file includes both (dark and light) themes which
switch by preferred color scheme.

The dedicated `alchemy/light-theme` and `alchemy/dark-theme` can be loaded in situations
where you want that explicit theme.
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.22%. Comparing base (dc7aeac) to head (ca51241).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3379   +/-   ##
=======================================
  Coverage   97.22%   97.22%           
=======================================
  Files         277      277           
  Lines        7254     7254           
=======================================
  Hits         7053     7053           
  Misses        201      201           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mamhoff mamhoff changed the title Add embedable CSS bundles Add embeddable CSS bundles Sep 18, 2025
@tvdeyen tvdeyen changed the title Add embeddable CSS bundles Seperate admin themes into CSS bundles Sep 18, 2025
@tvdeyen tvdeyen marked this pull request as ready for review September 18, 2025 12:59
Copy link
Copy Markdown
Contributor

@sascha-karnatz sascha-karnatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like it!

@tvdeyen tvdeyen merged commit ebc2af5 into main Sep 18, 2025
18 checks passed
@tvdeyen tvdeyen deleted the more-css-bundles branch September 18, 2025 13:34
@alchemycms-bot alchemycms-bot bot mentioned this pull request Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants