Skip to content

feat(colors): Mark color variables as default

Enrique Alcántara requested to merge feat-default-color-variables into master

Adds !default flag to GitLab UI color variables. The purpose of adding this flag is allowing GitLab UI clients to adopt the color accessibility updates progressively. If the client prefers keeping the previous color palette, it can overwrite GitLab UI color variables with the previous values.

In the case of GitLab, we can create several Merge Requests to remove the existing color palette variables and rely on GitLab UI palette as soon as we verify that each change looks correctly in the context of the application.

Reorganized import statements in src/scss/storybook.scss

Now that GitLab UI color variables are marked as !default they should be imported before Bootstrap variables. The reason is that GitLab UI and Bootstrap share color variable names. When GitLab UI color variables were not marked as !default, they overrode Bootstrap variable values, but after this change, a variable marked as !default does not override another variable marked as !default.

This change does not affect applications using GitLab UI because GitLab UI’s default import file, @gitlab/ui/src/scss/gitlab_ui.scss already organizes variable declarations in that way.

Edited by Enrique Alcántara

Merge request reports