-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(gv-modal): remove red color of close icon
BREAKING CHANGE: use naming convention for var css, read the component documentation for new names
- Loading branch information
Showing
4 changed files
with
63 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Components | ||
|
||
Each components can use `var() - CSS` for customisation. | ||
|
||
## How to add an CSS variable ? | ||
|
||
1. Add a new line in component documentation (ex: `@cssprop {Length} [--gv-modal--w=280px] - model width`) to declare | ||
the CSS variable. Be careful with the {Type} and use the naming convention. | ||
2. Use the custom property in own css code. | ||
3. **ONLY** if you want that's the component to be customizable on the portal, you **MUST** add `@theme facet` in "details" section of component documentation. | ||
4. Run `npm run generate:theme` to check the variable syntax and rebuild `definition.json` defining the default portal's theme. | ||
|
||
### Types | ||
|
||
Here are the types available for CSS variables : | ||
|
||
- Length (size in px...) | ||
- Color | ||
- String | ||
|
||
### Naming convention | ||
|
||
A CSS variable should have this format `--{component-name}-{?optionnal-explicit-selector}--{css-property}` | ||
and must only contain lowercase alpha and dash characters. | ||
The `css-property` part should have the *EMMET CHEAT SHEAT CSS* syntax. | ||
|
||
|
||
|
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 |
---|---|---|
|
@@ -44,7 +44,7 @@ const conf = { | |
} | ||
gv-modal { | ||
--gv-modal-width: 600px; | ||
--gv-modal--w: 600px; | ||
} | ||
`, | ||
}; | ||
|
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