Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Update deprecated color vars #4732

Closed
jameskoster opened this issue Jul 1, 2020 · 1 comment · Fixed by #4759
Closed

Update deprecated color vars #4732

jameskoster opened this issue Jul 1, 2020 · 1 comment · Fixed by #4759
Assignees
Labels
needs: design The issue requires design input/work from a designer.

Comments

@jameskoster
Copy link
Member

jameskoster commented Jul 1, 2020

We're using a few deprecated color variables in wc-admin. This issue illustrates which color vars to use in place of those that have been deprecated.

This list is based on what I was able to find actually being used in the code.

  • $light-gray-700$light-gray-secondary $gray-400
  • $light-gray-500$light-gray-secondary $gray-400
  • $light-gray-200$light-gray-tertiary $gray-100
  • $light-gray-100$light-gray-tertiary $gray-100
  • $dark-gray-900$dark-gray-primary $gray-900
  • $dark-gray-500$medium-gray-text $gray-700
  • $dark-gray-300$medium-gray-text $gray-700
  • $theme-colorvar(--wp-admin-theme-color)
@jameskoster jameskoster added the needs: design The issue requires design input/work from a designer. label Jul 1, 2020
@jameskoster
Copy link
Member Author

Var names appear to be updating again :D I will try to keep the original issue updated...

@samueljseay samueljseay self-assigned this Jul 6, 2020
samueljseay added a commit that referenced this issue Jul 17, 2020
Fixes #4732

This updates `@wordpress/base-styles`, and because `@wordpress/components` depends on variables from it, that must be updated as well.

There are 3 major changes required as part of updating:

1. The $theme-color variable is no longer exposed by base-styles. Instead there are 3 css vars exposed. These are made available by use of a provided mixin. Situations where $theme-color was darkened using scss have been mapped as best as possible to the 2 other darkened shades of the css var that are available such as `--wp-admin-theme-color-darker-20` and `--wp-admin-theme-color-darker-10`. In some cases this means the colors are not exactly the same as before.

2. The post css `theme()` call is no longer available. All uses of this have been consolidated to use of the main theme css var `--wp-admin-theme-color`. This means that calls like `theme(secondary)` or `theme(outline)` etc have all been consolidated to the one color.

3. Many of the variables used for different shades of gray have been deprecated. These have been mapped across to the new gray variables. (Mapped according to the list described in #4732)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: design The issue requires design input/work from a designer.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants