Skip to content

Commit 3fd42cb

Browse files
committed
Merge branch 'FW-6252' into FW-6252-chip
2 parents 7ec8f9d + da4e069 commit 3fd42cb

File tree

4 files changed

+12
-33
lines changed

4 files changed

+12
-33
lines changed

core/src/css/palettes/dark.scss

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,63 +17,54 @@ $colors: (
1717
contrast: #000,
1818
shade: get-color-shade($primary),
1919
tint: get-color-tint($primary),
20-
foreground: $primary,
2120
),
2221
secondary: (
2322
base: $secondary,
2423
contrast: #000,
2524
shade: get-color-shade($secondary),
2625
tint: get-color-tint($secondary),
27-
foreground: $secondary,
2826
),
2927
tertiary: (
3028
base: $tertiary,
3129
contrast: #000,
3230
shade: get-color-shade($tertiary),
3331
tint: get-color-tint($tertiary),
34-
foreground: $tertiary,
3532
),
3633
success: (
3734
base: $success,
3835
contrast: #000,
3936
shade: get-color-shade($success),
4037
tint: get-color-tint($success),
41-
foreground: $success,
4238
),
4339
warning: (
4440
base: $warning,
4541
contrast: #000,
4642
shade: get-color-shade($warning),
4743
tint: get-color-tint($warning),
48-
foreground: $warning,
4944
),
5045
danger: (
5146
base: $danger,
5247
contrast: #000,
5348
shade: get-color-shade($danger),
5449
tint: get-color-tint($danger),
55-
foreground: $danger,
5650
),
5751
light: (
5852
base: $light,
5953
contrast: #fff,
6054
shade: get-color-shade($light),
6155
tint: get-color-tint($light),
62-
foreground: $light,
6356
),
6457
medium: (
6558
base: $medium,
6659
contrast: #000,
6760
shade: get-color-shade($medium),
6861
tint: get-color-tint($medium),
69-
foreground: $medium,
7062
),
7163
dark: (
7264
base: $dark,
7365
contrast: #000,
7466
shade: get-color-shade($dark),
7567
tint: get-color-tint($dark),
76-
foreground: $dark,
7768
),
7869
);
7970

core/src/css/palettes/high-contrast-dark.scss

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,63 +17,54 @@ $colors: (
1717
contrast: #000,
1818
shade: get-color-shade($primary),
1919
tint: get-color-tint($primary),
20-
foreground: $primary,
2120
),
2221
secondary: (
2322
base: $secondary,
2423
contrast: #000,
2524
shade: get-color-shade($secondary),
2625
tint: get-color-tint($secondary),
27-
foreground: $secondary,
2826
),
2927
tertiary: (
3028
base: $tertiary,
3129
contrast: #000,
3230
shade: get-color-shade($tertiary),
3331
tint: get-color-tint($tertiary),
34-
foreground: $tertiary,
3532
),
3633
success: (
3734
base: $success,
3835
contrast: #000,
3936
shade: get-color-shade($success),
4037
tint: get-color-tint($success),
41-
foreground: $success,
4238
),
4339
warning: (
4440
base: $warning,
4541
contrast: #000,
4642
shade: get-color-shade($warning),
4743
tint: get-color-tint($warning),
48-
foreground: $warning,
4944
),
5045
danger: (
5146
base: $danger,
5247
contrast: #000,
5348
shade: get-color-shade($danger),
5449
tint: get-color-tint($danger),
55-
foreground: $danger,
5650
),
5751
light: (
5852
base: $light,
5953
contrast: #fff,
6054
shade: get-color-shade($light),
6155
tint: get-color-tint($light),
62-
foreground: $light,
6356
),
6457
medium: (
6558
base: $medium,
6659
contrast: #000,
6760
shade: get-color-shade($medium),
6861
tint: get-color-tint($medium),
69-
foreground: $medium,
7062
),
7163
dark: (
7264
base: $dark,
7365
contrast: #000,
7466
shade: get-color-shade($dark),
7567
tint: get-color-tint($dark),
76-
foreground: $dark,
7768
),
7869
);
7970

core/src/css/palettes/high-contrast.scss

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,63 +17,54 @@ $colors: (
1717
contrast: #fff,
1818
shade: get-color-shade($primary),
1919
tint: get-color-tint($primary),
20-
foreground: $primary,
2120
),
2221
secondary: (
2322
base: $secondary,
2423
contrast: #fff,
2524
shade: get-color-shade($secondary),
2625
tint: get-color-tint($secondary),
27-
foreground: $secondary,
2826
),
2927
tertiary: (
3028
base: $tertiary,
3129
contrast: #fff,
3230
shade: get-color-shade($tertiary),
3331
tint: get-color-tint($tertiary),
34-
foreground: $tertiary,
3532
),
3633
success: (
3734
base: $success,
3835
contrast: #fff,
3936
shade: get-color-shade($success),
4037
tint: get-color-tint($success),
41-
foreground: $success,
4238
),
4339
warning: (
4440
base: $warning,
4541
contrast: #fff,
4642
shade: get-color-shade($warning),
4743
tint: get-color-tint($warning),
48-
foreground: $warning,
4944
),
5045
danger: (
5146
base: $danger,
5247
contrast: #fff,
5348
shade: get-color-shade($danger),
5449
tint: get-color-tint($danger),
55-
foreground: $danger,
5650
),
5751
light: (
5852
base: $light,
5953
contrast: #000,
6054
shade: get-color-shade($light),
6155
tint: get-color-tint($light),
62-
foreground: $light,
6356
),
6457
medium: (
6558
base: $medium,
6659
contrast: #fff,
6760
shade: get-color-shade($medium),
6861
tint: get-color-tint($medium),
69-
foreground: $medium,
7062
),
7163
dark: (
7264
base: $dark,
7365
contrast: #fff,
7466
shade: get-color-shade($dark),
7567
tint: get-color-tint($dark),
76-
foreground: $dark,
7768
),
7869
);
7970

core/src/themes/functions.color.scss

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,20 @@
3939

4040
$value: map.get($values, $variation);
4141

42-
// If the color requested is subtle we return `--ion-color-primary-subtle-contrast`
43-
// Otherwise we return `--ion-color-primary-contrast`
42+
// TODO(): this can be removed when foreground is required
43+
// Fallback to "base" variant when "foreground" variant is undefined
44+
@if ($variation == foreground and $value == null) {
45+
$variation: base;
46+
$value: map.get($values, $variation);
47+
}
48+
49+
// If the color requested is subtle we return `--ion-color-{color}-subtle-contrast`,
50+
// otherwise we return `--ion-color-{color}-contrast`.
4451
$variable: if($subtle, "--ion-color-#{$name}-subtle-#{$variation}", "--ion-color-#{$name}-#{$variation}");
4552

46-
// If the variation being used is base, we do not include the variant so
47-
// If the color requested is subtle we return `--ion-color-primary-subtle`
48-
// Otherwise we return `--ion-color-primary`
53+
// If the variation being used is "base", we do not include the variant.
54+
// If the color requested is subtle we return `--ion-color-{color}-subtle`,
55+
// otherwise we return `--ion-color-{color}`.
4956
@if ($variation == base) {
5057
$variable: if($subtle, "--ion-color-#{$name}-subtle", "--ion-color-#{$name}");
5158
}
@@ -134,7 +141,6 @@
134141
$hue-colors: map.get($theme-colors, $color-name);
135142
$color-variants: map.get($hue-colors, $hue);
136143

137-
// Determine prefix based on hue value
138144
$prefix: if($hue == "subtle", "-subtle", "");
139145

140146
// TODO this @if can be removed if we add subtle colors for ios and md

0 commit comments

Comments
 (0)