Skip to content

web: Fix application of global styles in style roots.#17444

Merged
GirlBossRush merged 47 commits intomainfrom
fix-global-style-duplication
Nov 11, 2025
Merged

web: Fix application of global styles in style roots.#17444
GirlBossRush merged 47 commits intomainfrom
fix-global-style-duplication

Conversation

@GirlBossRush
Copy link
Contributor

@GirlBossRush GirlBossRush commented Oct 14, 2025

Details

This PR separates styles applied to the document root and body, fixing two issues:

  • Global variables are no longer injected twice that mess with precedence on default values.
  • Global styles which cannot apply in element style roots are no longer parsed and injected

Blocking Dependents

@GirlBossRush GirlBossRush requested review from a team as code owners October 14, 2025 16:46
@netlify
Copy link

netlify bot commented Oct 14, 2025

Deploy Preview for authentik-storybook canceled.

Name Link
🔨 Latest commit bc6c754
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/69138f5250eb910008745893

@netlify
Copy link

netlify bot commented Oct 14, 2025

Deploy Preview for authentik-integrations canceled.

Name Link
🔨 Latest commit bc6c754
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/69138f52e18d9f000832d5ea

@netlify
Copy link

netlify bot commented Oct 14, 2025

Deploy Preview for authentik-docs canceled.

Name Link
🔨 Latest commit bc6c754
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/69138f524ed14f000824da1d

@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.98%. Comparing base (8ff1fc1) to head (bc6c754).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17444      +/-   ##
==========================================
- Coverage   92.98%   92.98%   -0.01%     
==========================================
  Files         869      869              
  Lines       48040    48040              
==========================================
- Hits        44670    44669       -1     
- Misses       3370     3371       +1     
Flag Coverage Δ
e2e 45.27% <ø> (+<0.01%) ⬆️
integration 23.19% <ø> (+<0.01%) ⬆️
unit 91.07% <ø> (+<0.01%) ⬆️
unit-migrate 91.12% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@GirlBossRush GirlBossRush force-pushed the fix-global-style-duplication branch from e9cfdaf to fd12b7d Compare October 14, 2025 17:00
@github-actions
Copy link
Contributor

github-actions bot commented Oct 14, 2025

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-bc6c754127b5ac56ca4e1a0d20f7fc8dcc892b0e
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-bc6c754127b5ac56ca4e1a0d20f7fc8dcc892b0e

Afterwards, run the upgrade commands from the latest release notes.

@GirlBossRush GirlBossRush added the area:frontend Features or issues related to the browser, TypeScript, Node.js, etc label Oct 15, 2025
@GirlBossRush GirlBossRush force-pushed the fix-global-style-duplication branch 4 times, most recently from 651526e to 703faf0 Compare October 20, 2025 14:53
@GirlBossRush GirlBossRush force-pushed the fix-global-style-duplication branch from 703faf0 to 6949558 Compare October 24, 2025 02:49
@GirlBossRush GirlBossRush force-pushed the fix-global-style-duplication branch 2 times, most recently from 26963d2 to ddb9b3e Compare October 28, 2025 05:22
@GirlBossRush GirlBossRush force-pushed the fix-global-style-duplication branch from 7bf1e27 to 477ef16 Compare October 30, 2025 22:58
@GirlBossRush GirlBossRush force-pushed the fix-global-style-duplication branch 6 times, most recently from 7fe5a16 to cbcf944 Compare November 7, 2025 05:22
@GirlBossRush GirlBossRush force-pushed the fix-global-style-duplication branch from 052af2b to bc6c754 Compare November 11, 2025 19:32
@GirlBossRush GirlBossRush merged commit e426f88 into main Nov 11, 2025
98 checks passed
@GirlBossRush GirlBossRush deleted the fix-global-style-duplication branch November 11, 2025 20:49
Mmx233 added a commit to Mmx233/authentik that referenced this pull request Jan 31, 2026
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.
Mmx233 added a commit to Mmx233/authentik that referenced this pull request Jan 31, 2026
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.
GirlBossRush pushed a commit to Mmx233/authentik that referenced this pull request Feb 1, 2026
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.
GirlBossRush added a commit that referenced this pull request Feb 1, 2026
* 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>
authentik-automation bot pushed a commit that referenced this pull request Feb 1, 2026
* 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>
GirlBossRush added a commit that referenced this pull request Feb 1, 2026
* 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>
BeryJu pushed a commit that referenced this pull request Feb 1, 2026
…y-pick #19892 to version-2025.12) (#19900)

web: fix Brand CSS not applied to nested Shadow DOM components (#19892)

* 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



* Clarify.

---------

Signed-off-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com>
Co-authored-by: Mmx233 <36563672+Mmx233@users.noreply.github.com>
Co-authored-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:frontend Features or issues related to the browser, TypeScript, Node.js, etc bug/confirmed Confirmed bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants