Skip to content
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

✨Create legacy-colors-override.css #3510

Open
oddvernes opened this issue Jun 11, 2024 · 2 comments · May be fixed by #3518
Open

✨Create legacy-colors-override.css #3510

oddvernes opened this issue Jun 11, 2024 · 2 comments · May be fixed by #3518
Assignees

Comments

@oddvernes
Copy link
Collaborator

In eds-tokens, create a new eds-2-overrides.css file (maybe with a better name). Paste in the color variables from the old tokens.css in the root of eds-tokens (but skip the infographic ones) and make sure to rename the ones that are different in the js output overrides.
example

    static_icons__default: {
      hex: '#3d3d3d',
      hsla: 'hsla(0, 0%, 23.9%, 1)',
      rgba: 'var(--eds_text__static_icons__default, rgba(61, 61, 61, 1))'
    },

looks like
--eds_text_static_icons__default: rgba(61, 61, 61, 1);
in tokens.css, so there is an underscore missing between text and static that needs to be added. Not sure if this is the case in all or just some variables.

next each of the variables must be given a value from the new eds 2.0 semantic variables.
I think only

  --eds_interactive_secondary__resting: rgba(36, 55, 70, 1);
  --eds_interactive_secondary__link_hover: rgba(23, 36, 47, 1);

are missing on account of secondary button being removed, so in this case i guess we'll leave it, or use the values that had been intended for 2.0

Once tokens are published, people can import this file after variables.css and they should have 2.0 colors + dark theme out of the box in the eds-core-react components. We also need to make sure if there are hardcoded colors anywhere in the components that these are overridden too.

@oddvernes oddvernes changed the title ✨Create eds-2-overrides.css ✨Create legacy-colors-override.css Jun 13, 2024
@oddvernes oddvernes linked a pull request Jun 13, 2024 that will close this issue
@oddvernes
Copy link
Collaborator Author

I ended up getting the color variables from (src/base) typography.ts and colors.ts instead to make sure i got everything and with the correct names, and named the new file legacy-color-override.css

@oddvernes oddvernes self-assigned this Jun 14, 2024
@oddvernes
Copy link
Collaborator Author

This is on hold until we have final color tokens

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 a pull request may close this issue.

1 participant