Skip to content

Commit 2818e3c

Browse files
author
MPopov
committed
fix(themes): make sure that $base-color is not used anywhere in the framework
1 parent faffa29 commit 2818e3c

File tree

4 files changed

+32
-35
lines changed

4 files changed

+32
-35
lines changed

projects/igniteui-angular/src/lib/core/styles/themes/_index.scss

+3-7
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,6 @@
497497
@include igx-typography(
498498
$font-family: "'Open Sans', Helvetica, Arial, sans-serif",
499499
$type-scale: $fluent-type-scale,
500-
$base-color: #323130
501500
);
502501

503502
@include igx-theme(
@@ -532,8 +531,7 @@
532531

533532
@include igx-typography(
534533
$font-family: "'Open Sans', Helvetica, Arial, sans-serif",
535-
$type-scale: $fluent-type-scale,
536-
$base-color: #fff
534+
$type-scale: $fluent-type-scale
537535
);
538536

539537
@include igx-theme(
@@ -569,8 +567,7 @@
569567

570568
@include igx-typography(
571569
$font-family: '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
572-
$type-scale: $bootstrap-type-scale,
573-
$base-color: #212529
570+
$type-scale: $bootstrap-type-scale
574571
);
575572

576573
@include igx-calendar-typography($bootstrap-type-scale, $categories: (
@@ -632,8 +629,7 @@
632629

633630
@include igx-typography(
634631
$font-family: '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
635-
$type-scale: $bootstrap-type-scale,
636-
$base-color: #fff
632+
$type-scale: $bootstrap-type-scale
637633
);
638634

639635
@include igx-calendar-typography($bootstrap-type-scale, $categories: (

projects/igniteui-angular/src/lib/core/styles/typography/README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,13 @@ The typography mixin defines the global typography styles for an application, in
8484
It currently accepts 3 arguments:
8585
- `$font-family` - The global font family to be used by the application.
8686
- `$type-scale` - The default type scale to be used by the application.
87-
- `$base-color` - The base text color to be used by the application.
8887

8988
To overwrite the default typography, include the `igx-typography` mixin anywhere after the `igx-core` mixin. Let's take advantage of the type scale `$my-type-scale` we defined above and make it the default type scale.
9089

9190
```scss
9291
@include igx-typography(
9392
$font-family: "'Roboto', sans-serif",
94-
$type-scale: $my-type-scale,
95-
$base-color: #484848
93+
$type-scale: $my-type-scale
9694
);
9795
```
9896

projects/igniteui-angular/src/lib/core/styles/typography/_typography.scss

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
/// default-type-scale will be used.
3737
/// @param {String} $font-family ["'Titillium Web', sans-serif"] - The font family to be used across all typographic elements.
3838
/// @param {Map} $type-scale [$default-type-scale] - A type scale map as produced by igx-type-scale.
39-
/// @param {String} $base-color [rgba(0, 0, 0, .74)] - The default color used across all typographic elements (Components define their own text colors).
4039
@mixin igx-typography(
4140
$font-family: "'Titillium Web', sans-serif",
4241
$type-scale: $default-type-scale,

src/styles/igniteui-theme.scss

+28-24
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,43 @@
55
@import 'app-palettes';
66
@import 'app-layout';
77

8+
$igx-background-color: igx-color($default-palette, 'surface');
9+
$igx-foreground-color: text-contrast($igx-background-color);
10+
11+
body {
12+
background: $igx-background-color;
13+
color: #222;
14+
}
15+
816
@include igx-core($direction: ltr);
917

1018
/* autoprefixer grid: on */
11-
.default-theme {
12-
$igx-background-color: igx-color($default-palette, 'surface');
13-
$igx-foreground-color: text-contrast($igx-background-color);
1419

15-
background: $igx-background-color;
16-
color: $igx-foreground-color;
17-
18-
@include scrollbar-love();
19-
@include igx-theme($default-palette);
2020

21-
.nav-header {
22-
@include nav-logo('../assets/images/rsrcs/igniteui-logo-light-bg', $igx-background-color);
23-
}
24-
}
2521

26-
// .dark-theme {
27-
// $igx-background-color: igx-color($green-dark-palette, 'surface');
28-
// $igx-foreground-color: text-contrast($igx-background-color);
22+
@include scrollbar-love();
23+
@include igx-theme($default-palette);
2924

30-
// background: $igx-background-color;
31-
// color: $igx-foreground-color;
25+
.nav-header {
26+
@include nav-logo('../assets/images/rsrcs/igniteui-logo-light-bg', $igx-background-color);
27+
}
3228

33-
// @include scrollbar-love(lighten($igx-background-color, 15%));
34-
// @include igx-dark-theme($green-dark-palette);
35-
// @include igx-typography($font-family: 'sans-serif', $base-color: gray);
3629

37-
// .nav-header {
38-
// @include nav-logo('../assets/images/rsrcs/igniteui-logo-dark-bg', $igx-background-color);
39-
// }
40-
// }
30+
//.dark-theme {
31+
// $igx-background-color: igx-color($green-dark-palette, 'surface');
32+
// $igx-foreground-color: text-contrast($igx-background-color);
33+
//
34+
// background: $igx-background-color;
35+
// color: $igx-foreground-color;
36+
//
37+
// @include scrollbar-love(lighten($igx-background-color, 15%));
38+
// @include igx-dark-theme($green-dark-palette);
39+
// @include igx-typography($font-family: 'sans-serif');
40+
//
41+
// .nav-header {
42+
// @include nav-logo('../assets/images/rsrcs/igniteui-logo-dark-bg', $igx-background-color);
43+
// }
44+
//}
4145

4246
// .bootstrap-theme {
4347
// $igx-background-color: igx-color($bootstrap-palette, 'surface');

0 commit comments

Comments
 (0)