CSS Theming Recommendations v2 #1460
gravelfreeman
started this conversation in
Anything about Poznote
Replies: 1 comment
|
Thanks, done. It will ship with the next release.
Everything was compared in a browser against the previous build, in light, dark and black: nothing moves except the hardcoded colours that now follow the theme, and a few intentional dark-mode fixes (coloured icons keep their colour, alerts and accent text are more readable). I'm sure there are still some problems and UI bugs in there, but we will keep improving it. 😉 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Poznote should use one universal CSS theme API based on
--pz-*tokens.Target architecture
Use the same universal tokens in every mode. Only their values change:
Components should always consume the universal tokens:
The stable public API should contain:
--pz-color-*: canonical palette primitives and derived colours;--pz-*: universal structural and semantic roles.Theme authors should not need to define
--dm-*variables.Use the global palette as the source of truth
Semantic roles should reference
--pz-color-*instead of duplicating hardcoded colours:This applies to accent, link, danger, success, warning, selection, and disabled states. Derived values should use existing tokens or
color-mix().Remove duplicate dark layers
Application CSS should replace usages such as:
with their universal equivalents:
Rules that only differ by colour should become shared rules. Keep a dark-mode selector only when behavior is genuinely mode-specific.
Third-party libraries should be adapted at their integration boundary:
Libraries without CSS variables should receive focused overrides that use the universal Poznote tokens.
Theme author contract
A custom stylesheet should override only values that differ from the upstream defaults:
Theme authors shouldn’t need to copy the entire token list or redefine internal aliases unless they want deeper customization. Any values they leave unchanged should simply inherit from upstream.
Remaining hardcoded colors
I’ve noticed that many files are still using hardcoded colors after your last pass:
All reactions