-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
web: fix Brand CSS not applied to nested Shadow DOM components #19892
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
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
After PR goauthentik#17444, Brand CSS was only applied when ThemeChangeEvent fired. Components created after the initial event never received the custom styles. This fix immediately applies Brand CSS when a style root is set, ensuring all nested Shadow DOM components (like flow stages) receive brand styling regardless of when they are created.
a6f1d96 to
6bb557a
Compare
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Signed-off-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com>
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19892 +/- ##
==========================================
- Coverage 93.24% 93.21% -0.04%
==========================================
Files 968 968
Lines 53331 53331
==========================================
- Hits 49731 49712 -19
- Misses 3600 3619 +19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
* web: fix Brand CSS not applied to nested Shadow DOM components After PR #17444, Brand CSS was only applied when ThemeChangeEvent fired. Components created after the initial event never received the custom styles. This fix immediately applies Brand CSS when a style root is set, ensuring all nested Shadow DOM components (like flow stages) receive brand styling regardless of when they are created. * Update web/src/elements/Base.ts Signed-off-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com> * Clarify. --------- Signed-off-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com> Co-authored-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com>
Details
After PR #17444, Brand CSS was only applied when ThemeChangeEvent fired. Components created after the initial event never received the custom styles.
This fix immediately applies Brand CSS when a style root is set, ensuring all nested Shadow DOM components (like flow stages) receive brand styling regardless of when they are created.
Made and tested with a test image based on the
version/2025.12.2tag:mmx233/authentik:2025.12.2-fix-brand-cssFixes #19556
Checklist
ak test authentik/)make lint-fix)If an API change has been made
make gen-build)If changes to the frontend have been made
make web)If applicable
make docs)