-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dccb3c7
commit f5c8f67
Showing
4 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Button } from '@marigold/components'; | ||
|
||
export const SemanticColorsDemo = () => ( | ||
<Button variant="primary">Button Primary</Button> | ||
); |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
title: Semantic Colors | ||
switchTheme: true | ||
--- | ||
|
||
## Why do we introduce semantic colors? | ||
|
||
When developing UI elements, the definition of colors and their use plays a central role. For this purpose, the UX/UI designer defines a color palette and makes the information available to the developer. | ||
The developer then stores these colors in the code. As a rule, he uses color variables for this purpose. This has the advantage that when adjusting the blue tone, for example, only the value within the color variables needs to be adjusted and not within the CSS classes. | ||
Unfortunately it happens again and again that for reasons within the CSS not the color variables are used, but directly the HEX value is entered. | ||
(BSP -> ListBox | Link) this then sometimes leads to an increased maintenance effort. | ||
To avoid this and to provide a clear structure, the variables should always be used and semantic colors should be introduced. | ||
|
||
## Advantages of semantic colors? | ||
|
||
By defining semantic colors, designers and developers speak the same language. For this purpose, the elements, their color roles and interactivities are defined. | ||
Now, when talking about a particular element, everyone should also directly know its color role as well as its interactivity. This is to prevent an element from accidentally having a different hover color than all other elements with the same color role. | ||
Another advantage of semantic colors is that new designers and developers can more quickly understand the structure of components and how they are built. | ||
|
||
## How are the semantic colors composed? | ||
|
||
The semantic colors are composed as follows. | ||
|
||
The colors are composed as follows. | ||
|
||
<Preview> | ||
<SemanticColorsDemo /> | ||
</Preview> |
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