vira 31.13.2 → 31.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
* A color theme designed for straightforward accessible foreground and background color choices.
|
|
3
3
|
* All color pairs can be seen here: https://electrovir.github.io/vira/book/styles/vira-theme.
|
|
4
4
|
*
|
|
5
|
+
* Consider using [`colorCss` from
|
|
6
|
+
* @electrovir/color](https://electrovir.github.io/color/docs/functions/colorCss.html) for applying
|
|
7
|
+
* a foreground and background color at the same time in CSS.
|
|
8
|
+
*
|
|
5
9
|
* ## Color Pairs
|
|
6
10
|
*
|
|
7
11
|
* Each color choice is stored in a color pair. Each color pair includes a foreground and a
|
|
@@ -162,20 +166,22 @@
|
|
|
162
166
|
*
|
|
163
167
|
* To style an error message (red body text):
|
|
164
168
|
*
|
|
165
|
-
* ```
|
|
166
|
-
* viraTheme.colors['vira-red-foreground-body'].foreground.value;
|
|
169
|
+
* ```css
|
|
170
|
+
* color: ${viraTheme.colors['vira-red-foreground-body'].foreground.value};
|
|
167
171
|
* ```
|
|
168
172
|
*
|
|
169
173
|
* To style a green banner with white text:
|
|
170
174
|
*
|
|
171
|
-
* ```
|
|
172
|
-
*
|
|
175
|
+
* ```css
|
|
176
|
+
* .banner {
|
|
177
|
+
* ${colorCss(viraTheme.colors['vira-green-behind-bg-body'])};
|
|
178
|
+
* }
|
|
173
179
|
* ```
|
|
174
180
|
*
|
|
175
181
|
* `viraThemeByKeys` for structured access:
|
|
176
182
|
*
|
|
177
|
-
* ```
|
|
178
|
-
* viraThemeByKeys.red.foreground.body;
|
|
183
|
+
* ```css
|
|
184
|
+
* color: ${viraThemeByKeys.red.foreground.body.foreground.value};
|
|
179
185
|
* ```
|
|
180
186
|
*
|
|
181
187
|
* @category Color
|
|
@@ -5,6 +5,10 @@ import { viraColorPalette } from './vira-color-palette.js';
|
|
|
5
5
|
* A color theme designed for straightforward accessible foreground and background color choices.
|
|
6
6
|
* All color pairs can be seen here: https://electrovir.github.io/vira/book/styles/vira-theme.
|
|
7
7
|
*
|
|
8
|
+
* Consider using [`colorCss` from
|
|
9
|
+
* @electrovir/color](https://electrovir.github.io/color/docs/functions/colorCss.html) for applying
|
|
10
|
+
* a foreground and background color at the same time in CSS.
|
|
11
|
+
*
|
|
8
12
|
* ## Color Pairs
|
|
9
13
|
*
|
|
10
14
|
* Each color choice is stored in a color pair. Each color pair includes a foreground and a
|
|
@@ -165,20 +169,22 @@ import { viraColorPalette } from './vira-color-palette.js';
|
|
|
165
169
|
*
|
|
166
170
|
* To style an error message (red body text):
|
|
167
171
|
*
|
|
168
|
-
* ```
|
|
169
|
-
* viraTheme.colors['vira-red-foreground-body'].foreground.value;
|
|
172
|
+
* ```css
|
|
173
|
+
* color: ${viraTheme.colors['vira-red-foreground-body'].foreground.value};
|
|
170
174
|
* ```
|
|
171
175
|
*
|
|
172
176
|
* To style a green banner with white text:
|
|
173
177
|
*
|
|
174
|
-
* ```
|
|
175
|
-
*
|
|
178
|
+
* ```css
|
|
179
|
+
* .banner {
|
|
180
|
+
* ${colorCss(viraTheme.colors['vira-green-behind-bg-body'])};
|
|
181
|
+
* }
|
|
176
182
|
* ```
|
|
177
183
|
*
|
|
178
184
|
* `viraThemeByKeys` for structured access:
|
|
179
185
|
*
|
|
180
|
-
* ```
|
|
181
|
-
* viraThemeByKeys.red.foreground.body;
|
|
186
|
+
* ```css
|
|
187
|
+
* color: ${viraThemeByKeys.red.foreground.body.foreground.value};
|
|
182
188
|
* ```
|
|
183
189
|
*
|
|
184
190
|
* @category Color
|