Skip to content

Conversation

@kensternberg-authentik
Copy link
Collaborator

elements: refactor WCCSS preprocesser to handle dark mode better

What

Re-writes the structures and functions inside WCCSS to a more modern, class-oriented system. Too many details were getting lost in the noise, and the idea that these were “abstractions” that I needed to ignore just wasn’t cutting it. Re-writting the Patternfly reader so that it was clear what was happening at each step (pulling in the content, then traversing it to determine the :root CSS values) made the next step much easier.

Dark mode analysis has been added: the html[theme="dark"] selector is automatically detected if present in a component’s ReactCSS variant, and ported correctly to a web-component oriented format.

ak-button’s CSS has been re-activated as a pure WCCSS product, and it works correctly.

ak-tooltip was too heavily customized; it’s effectively our own code now, so it will remain “overridden.” (Also, it was misspelled “overriden,” which I have corrected.)

Why

Because the burden of hand-maintaining component with dark mode was become onerous, and this will accelerate the production of new components with dark mode attached.

…ures are plumbed through it. I think it's ready for the next stage, which is making it emit the dark mode stuff.
# What

Re-writes the structures and functions inside WCCSS to a more modern, class-oriented system. Too many details were getting lost in the noise, and the idea that these were “abstractions” that I needed to ignore just wasn’t cutting it. Re-writting the Patternfly reader so that it was clear what was happening at each step (pulling in the content, then traversing it to determine the `:root` CSS values) made the next step much easier.

Dark mode analysis has been added: the `html[theme="dark"]` selector is automatically detected if present in a component’s ReactCSS variant, and ported correctly to a web-component oriented format.

ak-button’s CSS has been re-activated as a pure WCCSS product, and it works correctly.

ak-tooltip was too heavily customized; it’s effectively our own code now, so it will remain “overridden.” (Also, it was misspelled “overriden,” which I have corrected.)

# Why

Because the burden of hand-maintaining component with dark mode was become onerous, and this will accelerate the production of new components with dark mode attached.
@netlify
Copy link

netlify bot commented Feb 2, 2026

Deploy Preview for authentik-elements-storybook ready!

Name Link
🔨 Latest commit 2dc2004
🔍 Latest deploy log https://app.netlify.com/projects/authentik-elements-storybook/deploys/69813b680e17550008350f19
😎 Deploy Preview https://deploy-preview-58--authentik-elements-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

* main:
  element: ak-progress (#48)
  Element/ak switch (#51)
  element: ak-hint (#57)
  ci: un-exclude dist folder (#56)
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.

1 participant