-
Notifications
You must be signed in to change notification settings - Fork 38
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
Prepare for theming and mode support #1727
Milestone
Comments
mrosvik
changed the title
Create color system that can handle dark mode
Prepare for theming support
Apr 11, 2024
Closed
mrosvik
changed the title
Prepare for theming support
Prepare for theming and mode support
Apr 11, 2024
Meeting 16.04
Form components
Link
Focus
Spinner
Helptext
Accordion
Darkmode
|
This was solved in #2130 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prepare for theming and mode support
To support dark mode and contrast mode we should prepare our tokens structure before the V1 release, since this will change the underlying tokens structure and generate some breaking changes. Colors should be rearranged into "Light", "Dark", "Contrast" sets. Also, tokens should not have names containing "light" or "dark". We have to investigate which inverted colors that still has meaning, and which will be replace by dark mode support.
In what order should we do this?
Update button and accordion with correct tokens (Remove inverted use inButton
#1826 and Replaceborder-top: ..border-on_inverted..
with gap inAccordion
#1827) @BarsnesRemove inverted tokens that should not exist anymore (see list below) (In a separate branch) @mrosvik @FebakkeRename dark tokens to strong (In a separate branch) @mrosvik @Febakke (feat(tokens): rename dark and light tokens to subtle and strong #1834)3.1
Update CSS to use the new strong tokens @Barsnes4.1
Create success, warning, danger, accent and neutral(grey) scale. How many tokens should we include to cover our needs? @Febakke @Thuneer The solid colors will not be linear, will reference to brand colors. Use Digdir, Mattilsynet, Brreg, Arbeidstilsynet as test cases.4.3
The new color system should include everything in the same set. Example: "Success" should include background, surface, border, text on the same level.4.1
Test token structureRenameaction
color toaccent
.Renamefirst
,second
,third
tobrand1
,brand2
,brand3
accent
andneutral
color. ~~Move base colors into two new sets "Light" and "Dark" in opposite directions. @mrosvik @Febakke (In a separate branch)4.1Test with flipping or if we need specific colors for Light and Dark. @mrosvik @Febakke4.2 Create test frames i Figma for dark and light modes with different component combinations. @Thuneer
4.3 Update the script that generates CSS @Barsnes @mimarz
5.1 Update existing tokens or add missing tokens.
How we should handle naming that includes "dark"
Following tokens with "dark" will be renamed:
surface-neutral-dark
-->surface-neutral-strong
surface-neutral-dark-hover
-->surface-neutral-strong-hover
border-action-dark
-->border-action-strong
border-action-dark-hover
-->border-action-strong-hover
surface-first/second/third-light
-->surface-first/second/third-subtle
surface-first/second/third-light-hover
-->surface-first/second/third-subtle-hover
surface-first/second/third-light-active
-->surface-first/second/third-subtle-active
surface-first/second/third-dark
-->surface-first/second/third-strong
How we should handle naming that includes "inverted"
Following inverted color tokens will be kept:
surface-neutral-inverted
(used in tooltip)text-on_inverted
(used in tooltip)Following inverted colors will be deleted as they are not in use, and will be replaced by dark-mode.
surface-on_inverted
surface-on_inverted-hover
surface-on_inverted-active
surface-on_inverted-no_fill
surface-on_inverted-no_fill-hover
surface-on_inverted-no_fill-active
Following inverted colors will be deleted as it is only in use to solve a Figma issue (white border between accordion items)
border-on_inverted-default
Tasks
Button
#1826border-top: ..border-on_inverted..
with gap inAccordion
#1827accent
andneutral
color for the Button Component #1868The text was updated successfully, but these errors were encountered: