-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move adr color token name variant (#1113)
* add content * fix
- Loading branch information
1 parent
10c3a30
commit 09da240
Showing
1 changed file
with
20 additions
and
8 deletions.
There are no files selected for viewing
28 changes: 20 additions & 8 deletions
28
contributor-docs/adrs/adr-009-color-token-name-variants.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,36 @@ | ||
# Title | ||
# Color token name variants | ||
|
||
## Status | ||
|
||
| Stage | Status | | ||
| -------- | ----------- | | ||
| Approved | <!-- ✅ --> | | ||
| Adopted | <!-- 🚧 --> | | ||
| Stage | Status | | ||
| -------- | ------ | | ||
| Approved | ✅ | | ||
| Adopted | ✅ | | ||
|
||
## Context | ||
|
||
<!-- Provide background information needed for this ADR --> | ||
As part of the new design token build process and naming convention, colors have all been moved over to the new system. Variant names have been reconciled as well to improve consistency and reduce confusion. | ||
|
||
## Decision | ||
|
||
<!-- Provide information about the decision made by this ADR --> | ||
See details about the `variant` part of a token in the [ADR for color token naming](./2023-03-28-color-token-naming.md). | ||
|
||
We will use the following naming convention for color variants: | ||
|
||
- `default` - The default color variant for a given token. Example: `fgColor-default` | ||
- `muted` - The secondary color variant for a given token. Example: `fgColor-muted` | ||
- `emphasis` - The opposite of "muted", emphasis is a stronger color variant. Example: `bgColor-accent-emphasis` | ||
|
||
In this model, `muted` is used universally to mean "secondary" or "less important". Previously, we used a combination of `subtle` and `muted`. | ||
|
||
The term `subtle` is being deprecated and replaced with `muted` tokens. This decreases the number of variants we need to maintain and is (ideally) easier to use. | ||
|
||
### Impact | ||
|
||
<!-- Describe the impact of the decision --> | ||
If we need to extend the number of variants in the future, it will be difficult to find a term to represent a third color variant. Using terms like "secondary" opens us up to the ability to add "tertiary" and so on if we need it. However, we want to keep the surface area of color variants as small as possible. | ||
|
||
### Alternatives | ||
|
||
<!-- Describe the available alternatives if any, and why the current apporach was chosen --> | ||
|
||
This ADR has been moved from its original place in github/primer ([view original](https://github.com/github/primer/blob/85827cee9022657301b88c3548e8dd6e3f728afa/adrs/2023-03-28-color-token-name-variants.md)). |