matcha-theme 20.188.0 → 20.189.0

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.
@@ -3,12 +3,14 @@ $saturationLevels: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, A100, A200,
3
3
 
4
4
  // Hues Palette Colors
5
5
  $index: 0;
6
+
6
7
  // -------------------------------------------------------------------------------------------------------------------
7
8
  // @ Text color levels generator
8
9
  // -------------------------------------------------------------------------------------------------------------------
9
10
  @mixin _generate-text-color-levels($classes, $contrast) {
10
- @if ($contrast == "dark") {
11
+ @if ($contrast =="dark") {
11
12
  #{$classes} {
13
+
12
14
  &.secondary-text,
13
15
  .secondary-text {
14
16
  color: rgba(0, 0, 0, 0.54) !important;
@@ -26,8 +28,11 @@ $index: 0;
26
28
  color: rgba(0, 0, 0, 0.12) !important;
27
29
  }
28
30
  }
29
- } @else {
31
+ }
32
+
33
+ @else {
30
34
  #{$classes} {
35
+
31
36
  &.secondary-text,
32
37
  .secondary-text {
33
38
  color: rgba(255, 255, 255, 0.7) !important;
@@ -72,7 +77,7 @@ $index: 0;
72
77
  color: $color !important;
73
78
  }
74
79
 
75
- @if ($saturation == "-500") {
80
+ @if ($saturation =="-500") {
76
81
  $colorSelectorDefault: unquote(".#{$colorName}");
77
82
 
78
83
  #{$colorSelectorDefault}-bg {
@@ -87,56 +92,59 @@ $index: 0;
87
92
 
88
93
  @mixin colors-classes-static($theme) {
89
94
  $palettes: getAllPalettes($theme);
90
- $light-contrasting-classes: ();
91
- $dark-contrasting-classes: ();
92
-
93
- @each $paletteName, $palette in $palettes {
94
- // $contrasts: map-get($red, "contrast");
95
- // $contrasts = all contrast colors of $red palette
96
- $contrasts: map-get($palette, "contrast");
97
-
98
- @each $saturation in $saturationLevels {
99
- // $color: map-get($red, 500)
100
- // $contrast: map-get($contrasts, 500); 500 contrast color of $red palette
101
- $color: map-get($palette, $saturation);
102
- $contrast: map-get($contrasts, $saturation);
103
-
104
- @if ($color != null and $contrast != null) {
105
- @include _generate-static-color-classes($paletteName, $color, $contrast, "-#{$saturation}");
106
-
107
- // If the contrast color is dark
108
- @if (rgba(black, 1) ==rgba($contrast, 1)) {
109
- $dark-contrasting-classes: append(
110
- $dark-contrasting-classes,
95
+ $light-contrasting-classes: (
96
+ );
97
+ $dark-contrasting-classes: (
98
+ );
99
+
100
+ @each $paletteName, $palette in $palettes {
101
+ // $contrasts: map-get($red, "contrast");
102
+ // $contrasts = all contrast colors of $red palette
103
+ $contrasts: map-get($palette, "contrast");
104
+
105
+ @each $saturation in $saturationLevels {
106
+ // $color: map-get($red, 500)
107
+ // $contrast: map-get($contrasts, 500); 500 contrast color of $red palette
108
+ $color: map-get($palette, $saturation);
109
+ $contrast: map-get($contrasts, $saturation);
110
+
111
+ @if ($color !=null and $contrast !=null) {
112
+ @include _generate-static-color-classes($paletteName, $color, $contrast, "-#{$saturation}");
113
+
114
+ // If the contrast color is dark
115
+ @if (rgba(black, 1)==rgba($contrast, 1)) {
116
+ $dark-contrasting-classes: append($dark-contrasting-classes,
111
117
  unquote(".#{$paletteName}-#{$saturation}"),
112
118
  "comma"
113
119
  );
114
- }
120
+ }
115
121
 
116
- // if the contrast color is light
117
- @else {
118
- $light-contrasting-classes: append(
119
- $light-contrasting-classes,
122
+ // if the contrast color is light
123
+ @else {
124
+ $light-contrasting-classes: append($light-contrasting-classes,
120
125
  unquote(".#{$paletteName}-#{$saturation}"),
121
126
  "comma"
122
127
  );
123
- }
124
128
  }
125
129
  }
126
130
  }
131
+ }
127
132
 
128
- // Generate contrasting colors
129
- @include _generate-text-color-levels($dark-contrasting-classes, "dark");
130
- @include _generate-text-color-levels($light-contrasting-classes, "light");
133
+ // Generate contrasting colors
134
+ @include _generate-text-color-levels($dark-contrasting-classes, "dark");
135
+ @include _generate-text-color-levels($light-contrasting-classes, "light");
131
136
  }
132
137
 
133
138
  // -------------------------------------------------------------------------------------------------------------------
134
139
  // @ Dynamic color classes generator
135
140
  // -------------------------------------------------------------------------------------------------------------------
136
141
  @mixin colors-classes-dynamic($theme) {
142
+ $primary: map-get($theme, primary);
137
143
  $accent: map-get($theme, accent);
144
+ $danger: map-get($theme, danger);
145
+ $success: map-get($theme, success);
138
146
  $warn: map-get($theme, warn);
139
- $primary: map-get($theme, primary);
147
+ $info: map-get($theme, info);
140
148
  $background: map-get($theme, background);
141
149
  $foreground: map-get($theme, foreground);
142
150
 
@@ -162,123 +170,190 @@ $index: 0;
162
170
  blue-grey: getBlueGrey,
163
171
  primary: getPrimary,
164
172
  accent: getAccent,
173
+ danger: getDanger,
165
174
  warn: getWarn,
175
+ success: getSuccess,
176
+ info: getInfo,
166
177
  disabled: getDisabled,
167
178
  );
168
179
 
169
- @include colors-classes-static($theme);
180
+ @include colors-classes-static($theme);
170
181
 
171
- .color-unset{
172
- color: map-get($foreground, foreground );
173
- .ripple {
174
- background: map-get($foreground, foreground );
175
- }
182
+ .color-unset {
183
+ color: map-get($foreground, foreground);
184
+
185
+ .ripple {
186
+ background: map-get($foreground, foreground);
176
187
  }
177
- @each $colorName, $colorFn in $color-functions {
178
- .background-#{$colorName}-alpha {background: call(#{$colorFn}Alpha, $theme)}
179
- .#{$colorName} .ripple{background: call(#{$colorFn}Alpha, $theme)}
180
- .background-#{$colorName}{background: call(#{$colorFn}, $theme)}
181
- .border-color-#{$colorName}{border-color: call(#{$colorFn}, $theme)}
182
- .color-#{$colorName}{color: call(#{$colorFn}, $theme)!important}
183
- .fill-#{$colorName}{fill: call(#{$colorFn}, $theme)}
184
- .stroke-#{$colorName}{stroke: call(#{$colorFn}, $theme)}
185
- .color-#{$colorName}-alpha{color: call(#{$colorFn}Alpha, $theme)!important}
186
- .#{$colorName}-alpha{
187
- background: call(#{$colorFn}Alpha, $theme);
188
- color: call(#{$colorFn}, $theme);
189
- }
190
- .#{$colorName}{
191
- background: call(#{$colorFn}, $theme);
192
- color: call(#{$colorFn}Contrast, $theme);
193
- }
188
+ }
189
+
190
+ @each $colorName, $colorFn in $color-functions {
191
+ .background-#{$colorName}-alpha {
192
+ background: call(#{$colorFn}Alpha, $theme)
194
193
  }
195
194
 
196
- .background-basic-alpha {background: getForegroundAlpha($theme)}
197
- .basic .ripple{background: getForegroundAlpha($theme)}
198
- .background-basic{background: getSurface($theme)}
199
- .border-color-basic{border-color:getForeground($theme)}
200
- .color-basic{color: getForeground($theme)!important}
201
- .fill-basic{fill: getSurface($theme)}
202
- .stroke-basic{stroke: getForeground($theme)}
203
- .color-basic-alpha{color: getForegroundAlpha($theme)!important}
204
- .basic-alpha{
205
- background: getForegroundAlpha($theme);
206
- color: getForeground($theme);
195
+ .#{$colorName} .ripple {
196
+ background: call(#{$colorFn}Alpha, $theme)
207
197
  }
208
- .basic{
209
- background: getSurface($theme);
210
- color: getForeground($theme);
198
+
199
+ .background-#{$colorName} {
200
+ background: call(#{$colorFn}, $theme)
211
201
  }
212
202
 
213
- .color-unset {
214
- color: unset;
203
+ .border-color-#{$colorName} {
204
+ border-color: call(#{$colorFn}, $theme)
215
205
  }
216
206
 
217
- .background-transparent {
218
- background: transparent;
207
+ .color-#{$colorName} {
208
+ color: call(#{$colorFn}, $theme) !important
219
209
  }
220
210
 
221
- $attributes: (color, border-color, background, fill, stroke
222
- );
223
- @each $attribute in $attributes {
224
- @if ($attribute != "color") {
225
- .#{$attribute}-bg {
226
- #{$attribute}: getBackground($theme) !important;
227
- }
228
- .#{$attribute}-bg-alpha {
229
- #{$attribute}: getBackgroundAlpha($theme) !important;
230
- }
231
- .#{$attribute}-bg-inverse {
232
- #{$attribute}: getBackgroundInverse($theme) !important;
233
- }
234
- .#{$attribute}-bg-alpha-inverse {
235
- #{$attribute}: getBackgroundAlphaInverse($theme) !important;
236
- }
237
- .#{$attribute}-surface-inverse {
238
- #{$attribute}: getSurfaceInverse($theme) !important;
239
- }
240
- .#{$attribute}-surface-alpha-inverse {
241
- #{$attribute}: getSurfaceAlphaInverse($theme) !important;
242
- }
243
- }
211
+ .fill-#{$colorName} {
212
+ fill: call(#{$colorFn}, $theme)
213
+ }
244
214
 
245
- .#{$attribute}-fg,
246
- .#{$attribute}-base,
247
- .#{$attribute}-text {
248
- #{$attribute}: getForeground($theme) !important;
249
- }
215
+ .stroke-#{$colorName} {
216
+ stroke: call(#{$colorFn}, $theme)
217
+ }
218
+
219
+ .color-#{$colorName}-alpha {
220
+ color: call(#{$colorFn}Alpha, $theme) !important
221
+ }
222
+
223
+ .#{$colorName}-alpha {
224
+ background: call(#{$colorFn}Alpha, $theme);
225
+ color: call(#{$colorFn}, $theme);
226
+ }
227
+
228
+ .#{$colorName} {
229
+ background: call(#{$colorFn}, $theme);
230
+ color: call(#{$colorFn}Contrast, $theme);
231
+ }
232
+ }
233
+
234
+ .background-basic-alpha {
235
+ background: getForegroundAlpha($theme)
236
+ }
237
+
238
+ .basic .ripple {
239
+ background: getForegroundAlpha($theme)
240
+ }
241
+
242
+ .background-basic {
243
+ background: getSurface($theme)
244
+ }
245
+
246
+ .border-color-basic {
247
+ border-color: getForeground($theme)
248
+ }
249
+
250
+ .color-basic {
251
+ color: getForeground($theme) !important
252
+ }
253
+
254
+ .fill-basic {
255
+ fill: getSurface($theme)
256
+ }
257
+
258
+ .stroke-basic {
259
+ stroke: getForeground($theme)
260
+ }
261
+
262
+ .color-basic-alpha {
263
+ color: getForegroundAlpha($theme) !important
264
+ }
265
+
266
+ .basic-alpha {
267
+ background: getForegroundAlpha($theme);
268
+ color: getForeground($theme);
269
+ }
270
+
271
+ .basic {
272
+ background: getSurface($theme);
273
+ color: getForeground($theme);
274
+ }
275
+
276
+ .color-unset {
277
+ color: unset;
278
+ }
250
279
 
251
- .#{$attribute}-fg-inverse,
252
- .#{$attribute}-base-inverse,
253
- .#{$attribute}-text-inverse {
254
- #{$attribute}: getForegroundInverse($theme) !important;
280
+ .background-transparent {
281
+ background: transparent;
282
+ }
283
+
284
+ $attributes: (
285
+ color,
286
+ border-color,
287
+ background,
288
+ fill,
289
+ stroke
290
+ );
291
+
292
+ @each $attribute in $attributes {
293
+ @if ($attribute !="color") {
294
+ .#{$attribute}-bg {
295
+ #{$attribute}: getBackground($theme) !important;
255
296
  }
256
297
 
257
- .#{$attribute}-surface {
258
- #{$attribute}: getSurface($theme) !important;
298
+ .#{$attribute}-bg-alpha {
299
+ #{$attribute}: getBackgroundAlpha($theme) !important;
259
300
  }
260
301
 
261
- .#{$attribute}-surface-alpha {
262
- #{$attribute}: getSurfaceAlpha($theme) !important;
302
+ .#{$attribute}-bg-inverse {
303
+ #{$attribute}: getBackgroundInverse($theme) !important;
263
304
  }
264
305
 
265
- .#{$attribute}-placeholder {
266
- #{$attribute}: getGrey($theme) !important;
267
- &-alpha {
268
- background: rgba(getGrey($theme), 0.2) !important;
269
- }
306
+ .#{$attribute}-bg-alpha-inverse {
307
+ #{$attribute}: getBackgroundAlphaInverse($theme) !important;
270
308
  }
271
309
 
272
- .#{$attribute}-label {
273
- #{$attribute}: getBlueGrey($theme) !important;
310
+ .#{$attribute}-surface-inverse {
311
+ #{$attribute}: getSurfaceInverse($theme) !important;
274
312
  }
275
313
 
276
- .#{$attribute}-disabled {
277
- #{$attribute}: getDisabled($theme) !important;
314
+ .#{$attribute}-surface-alpha-inverse {
315
+ #{$attribute}: getSurfaceAlphaInverse($theme) !important;
278
316
  }
317
+ }
318
+
319
+ .#{$attribute}-fg,
320
+ .#{$attribute}-base,
321
+ .#{$attribute}-text {
322
+ #{$attribute}: getForeground($theme) !important;
323
+ }
324
+
325
+ .#{$attribute}-fg-inverse,
326
+ .#{$attribute}-base-inverse,
327
+ .#{$attribute}-text-inverse {
328
+ #{$attribute}: getForegroundInverse($theme) !important;
329
+ }
330
+
331
+ .#{$attribute}-surface {
332
+ #{$attribute}: getSurface($theme) !important;
333
+ }
279
334
 
280
- .#{$attribute}-disabled-icon {
281
- #{$attribute}: getDisabledContrast($theme) !important;
335
+ .#{$attribute}-surface-alpha {
336
+ #{$attribute}: getSurfaceAlpha($theme) !important;
337
+ }
338
+
339
+ .#{$attribute}-placeholder {
340
+ #{$attribute}: getGrey($theme) !important;
341
+
342
+ &-alpha {
343
+ background: rgba(getGrey($theme), 0.2) !important;
282
344
  }
283
345
  }
346
+
347
+ .#{$attribute}-label {
348
+ #{$attribute}: getBlueGrey($theme) !important;
349
+ }
350
+
351
+ .#{$attribute}-disabled {
352
+ #{$attribute}: getDisabled($theme) !important;
353
+ }
354
+
355
+ .#{$attribute}-disabled-icon {
356
+ #{$attribute}: getDisabledContrast($theme) !important;
357
+ }
284
358
  }
359
+ }