Skip to content

Conversation

@sachanobi-sensei
Copy link

  • update from_admin_policy condition in getIsDark for better support

+ update from_admin_policy condition in getIsDark for better support
@garronej
Copy link
Collaborator

Hey @sachanobi-sensei,

I know the sementic is confusing here but it's not on me, it's the keycloak team's convention.

kcContext.darkMode does not define if the theme should be rendered in dark mode or not.
It tells if the theme is allowed to render in dark mode.
Like if it's set to true the theme, if it supports it and if it deems it relevent can possibly render in dark mode.
If it's set to false it means that the theme should never render in dark mode.

So when you are enabling dark mode in the console you're not actually hard coding the mode to dark you are allowing the theme to render in dark mode.

I wouldn't have done it this way, I would have named the property isDarkModeAllowed but it's not my decision to make and I think it's best that this theme behave like the builtin UI behave.

Thank for your PR anyway. I can merge the other thing if you open another PR.

@garronej garronej closed this Nov 20, 2025
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