Skip to content

Commit ffa8be1

Browse files
committed
fix(theme): various fixes and improvements
1 parent f22bb12 commit ffa8be1

File tree

9 files changed

+35
-21
lines changed

9 files changed

+35
-21
lines changed

projects/igniteui-angular/src/lib/core/styles/base/_variables.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,3 @@ $components: () !default;
2323
/// The global themes registry map.
2424
$themes: () !default;
2525

26-
/// The global background color.
27-
$igx-background-color: #fff !default;
28-
$igx-foreground-color: rgba(0, 0, 0, .87) !default;

projects/igniteui-angular/src/lib/core/styles/base/utilities/_functions.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,18 +297,19 @@
297297
/// @param {Color} $success [#4eb862] - The success color used throughout the application.
298298
/// @param {Color} $warn [#fbb13c] - The warning color used throughout the application.
299299
/// @param {Color} $error [#ff134a] - The error color used throughout the application.
300-
/// @param {Color} $grays [#000] - The color used for generating the grayscale palette.
300+
/// @param {Color} $grays [$igx-foreground-color] - The color used for generating the grayscale palette.
301301
/// @param {Color} $surface [#fff] - The color used as a background in components, such as cards, sheets, and menus.
302302
/// @returns {Map} - A map consisting of 74 color variations, including the `primary`, `secondary`, `grays`,
303303
/// `info`, `success`, `warn`, and `error` colors.
304+
/// @see $igx-foreground-color
304305
@function igx-palette(
305306
$primary,
306307
$secondary,
307308
$info: #1377d5,
308309
$success: #4eb862,
309310
$warn: #fbb13c,
310311
$error: #ff134a,
311-
$grays: #000,
312+
$grays: if(global-variable-exists('igx-foreground-color'), $igx-foreground-color, #000),
312313
$surface: #fff
313314
) {
314315
$saturations: (50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 'A100', 'A200', 'A400', 'A700');

projects/igniteui-angular/src/lib/core/styles/components/card/_card-theme.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,6 @@
474474
}
475475
}
476476

477-
%igx-card-content,
478477
%igx-card-content > p {
479478
@include igx-type-style($type-scale, $content) {
480479
margin: 0;

projects/igniteui-angular/src/lib/core/styles/components/tabs/_tabs-theme.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@
240240
align-items: center;
241241
overflow: hidden;
242242
background: --var($theme, 'item-background');
243+
243244
@if $not-bootstrap-theme {
244245
box-shadow: --var($theme, 'tab-area-shadow');
245246
}
@@ -350,6 +351,9 @@
350351
outline: 0;
351352
color: --var($theme, 'item-active-color');
352353

354+
@if $bootstrap-theme {
355+
border-color: --var($theme, 'border-color--hover') --var($theme, 'border-color--hover') transparent;
356+
}
353357

354358
&:focus {
355359
background: --var($theme, 'item-active-background');

projects/igniteui-angular/src/lib/core/styles/components/time-picker/_time-picker-theme.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,9 @@
354354
}
355355

356356
%time-picker__header-hour {
357-
@include igx-type-style($type-scale, $header-hour);
357+
@include igx-type-style($type-scale, $header-hour) {
358+
margin-top: 0;
359+
}
358360
}
359361

360362
%time-picker__column {

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

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
@import '../print/index';
6262

6363
/// Includes the base for each theme.
64-
6564
[class^='igx-'] {
6665
&,
6766
*,
@@ -71,14 +70,27 @@
7170
}
7271
}
7372

74-
@mixin igx-core($print-layout: true, $direction: ltr) {
73+
/// @param {boolean} $print-layout [true] - Activates the printing styles of the components.
74+
/// @param {string} $direction [ltr] - Sets the layout direction. Can be 'ltr' or 'rtl'.
75+
/// @param {color} $foreground-color [0, 0, 0, .87] - Sets the value of the global $igx-foreground-color used in all typography styles.
76+
/// @see $igx-foreground-color
77+
/// @requires {mixin} igx-typography
78+
/// @requires {mixin} igx-vhelper
79+
/// @requires {mixin} igx-print-layout
80+
@mixin igx-core(
81+
$print-layout: true,
82+
$direction: ltr,
83+
$foreground-color: rgba(0, 0, 0, .87)
84+
) {
7585
@if $direction != ltr and $direction != rtl {
7686
$direction: ltr !global;
7787
} @else {
7888
$direction: $direction !global;
7989
}
8090

81-
@include igx-typography();
91+
$igx-foreground-color: $foreground-color !global;
92+
93+
@include igx-typography($base-color: $foreground-color);
8294
@include igx-vhelper();
8395

8496
@if $print-layout == true {

projects/igniteui-angular/src/lib/core/styles/themes/schemas/dark/_tabs.scss

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ $_dark-fluent-tabs: extend($_fluent-tabs, $_base-dark-tabs);
3333
/// @requires {function} extend
3434
/// @requires $_bootstrap-tabs
3535
$_dark-bootstrap-tabs: extend($_bootstrap-tabs, (
36-
item-background: #333,
37-
button-background: #333,
38-
item-hover-background: #333,
39-
item-active-background: #333,
36+
// item-active-background: #333,
4037
item-hover-color: (
4138
igx-color: ('primary', 400)
4239
),

projects/igniteui-angular/src/lib/core/styles/themes/schemas/light/_tabs.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ $_bootstrap-tabs: extend(
124124
(
125125
variant: 'bootstrap',
126126

127+
item-background: inherit,
128+
127129
border-color: (
128130
igx-color: ('grays', 300)
129131
),
@@ -136,7 +138,7 @@ $_bootstrap-tabs: extend(
136138
igx-color: ('primary', 500)
137139
),
138140

139-
item-hover-background: #fff,
141+
item-hover-background: inherit,
140142

141143
item-hover-color: (
142144
igx-color: ('primary', 700)
@@ -150,7 +152,7 @@ $_bootstrap-tabs: extend(
150152
igx-color: ('grays', 800)
151153
),
152154

153-
item-active-background: #fff,
155+
item-active-background: inherit,
154156

155157
indicator-color: (
156158
igx-color: ('grays', 400)

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@
8282
}
8383

8484
// Add native element typographic styles.
85-
@if $e != null {
86-
#{$e} {
87-
@extend %#{$category};
88-
}
89-
}
85+
// @if $e != null {
86+
// #{$e} {
87+
// @extend %#{$category};
88+
// }
89+
// }
9090

9191
// Add class selector typographic styles.
9292
@include e(#{$category}) {

0 commit comments

Comments
 (0)