Skip to content

Commit 9dcd93e

Browse files
committed
refactor(themes): consolidate toolbar SCSS files, remove redundancies
- Merged and streamlined SCSS structure for grid toolbar themes. - Removed redundant dark and light list/toolbar styling files. - Adjusted `_base.scss` to use unified theme tokens for consistency. - Cleaned up unused variables and improved maintainability.
1 parent 551771a commit 9dcd93e

12 files changed

Lines changed: 37 additions & 80 deletions

File tree

projects/igniteui-angular/grids/core/src/toolbar/themes/_base.scss

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
@use 'igniteui-theming/sass/typography' as *;
44
@use 'igniteui-theming/sass/color/functions' as *;
55
@use 'styles/themes/standalone' as *;
6-
@use './light/list/tokens' as list;
7-
@use './light/toolbar/tokens' as toolbar;
6+
@use 'light/tokens' as *;
87

9-
$_theme: toolbar.$base;
10-
$_theme-dd: list.$base;
8+
$theme: $base;
119

1210
@include layer(base) {
1311
@include b(igx-grid-toolbar) {
@@ -21,10 +19,10 @@ $_theme-dd: list.$base;
2119
justify-content: space-between;
2220
grid-row: 1;
2321
font-size: rem(16px);
24-
border-bottom: rem(1px) solid var-get($_theme, 'border-color');
25-
background: var-get($_theme, 'background-color');
22+
border-bottom: rem(1px) solid var-get($theme, 'border-color');
23+
background: var-get($theme, 'background-color');
2624
height: auto;
27-
min-height: var-get($_theme, 'size');
25+
min-height: var-get($theme, 'size');
2826
padding-block: 0;
2927
padding-inline-start: pad-inline(rem(12px), rem(16px), rem(24px));
3028
padding-inline-end: pad-inline(rem(8px), rem(12px), rem(16px));
@@ -57,7 +55,7 @@ $_theme-dd: list.$base;
5755
@include e(title) {
5856
@include ellipsis();
5957

60-
color: var-get($_theme, 'title-text-color');
58+
color: var-get($theme, 'title-text-color');
6159
flex: 1 1 auto;
6260
max-width: 40ch;
6361
margin-inline-end: rem(16px);
@@ -111,7 +109,7 @@ $_theme-dd: list.$base;
111109
bottom: rem(-1px);
112110
height: rem(2px);
113111
overflow: hidden;
114-
background: var-get($_theme, 'background-color');
112+
background: var-get($theme, 'background-color');
115113

116114
igx-linear-bar > * {
117115
border-radius: 0;
@@ -128,7 +126,7 @@ $_theme-dd: list.$base;
128126

129127
@include e(dd-list){
130128
list-style: none;
131-
background: var-get($_theme-dd, 'dropdown-background');
129+
background: var-get($theme, 'dropdown-background');
132130
margin: 0;
133131
padding: 0;
134132
box-shadow: var(--ig-elevation-8);
@@ -138,17 +136,17 @@ $_theme-dd: list.$base;
138136
cursor: pointer;
139137
position: relative;
140138
padding: rem(8px) rem(16px);
141-
color: var-get($_theme-dd, 'item-text-color');
139+
color: var-get($theme, 'item-text-color');
142140
white-space: nowrap;
143141

144142
&:hover {
145-
background: var-get($_theme-dd, 'item-hover-background');
146-
color: var-get($_theme-dd, 'item-hover-text-color');
143+
background: var-get($theme, 'item-hover-background');
144+
color: var-get($theme, 'item-hover-text-color');
147145
}
148146

149147
&:focus {
150-
background: var-get($_theme-dd, 'item-focus-background');
151-
color: var-get($_theme-dd, 'item-focus-text-color');
148+
background: var-get($theme, 'item-focus-background');
149+
color: var-get($theme, 'item-focus-text-color');
152150
}
153151
}
154152
}
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1-
@forward 'list';
2-
@forward 'toolbar';
1+
@use 'sass:meta';
2+
@use 'sass:map';
3+
@use 'tokens';
4+
@use 'styles/themes/standalone' as *;
5+
6+
$toolbar-tokens: map.remove(meta.module-variables(tokens), 'props');
7+
@include themes(igx-grid-toolbar, $toolbar-tokens, dark);

projects/igniteui-angular/grids/core/src/toolbar/themes/dark/toolbar/_tokens.scss renamed to projects/igniteui-angular/grids/core/src/toolbar/themes/dark/_tokens.scss

File renamed without changes.

projects/igniteui-angular/grids/core/src/toolbar/themes/dark/list/_index.scss

Lines changed: 0 additions & 6 deletions
This file was deleted.

projects/igniteui-angular/grids/core/src/toolbar/themes/dark/list/_tokens.scss

Lines changed: 0 additions & 11 deletions
This file was deleted.

projects/igniteui-angular/grids/core/src/toolbar/themes/dark/toolbar/_index.scss

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1-
@forward 'list';
2-
@forward 'toolbar';
1+
@use 'sass:meta';
2+
@use 'sass:map';
3+
@use 'tokens';
4+
@use 'styles/themes/standalone' as *;
5+
6+
$tokens: meta.module-variables(tokens);
7+
@include themes(igx-grid-toolbar, $tokens, light);
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@use 'sass:list';
2+
@use 'styles/themes/standalone' as *;
3+
@use 'igniteui-theming/sass/themes' as *;
4+
@use 'igniteui-theming/sass/themes/schemas/components/light/grid-toolbar' as *;
5+
6+
$base: digest-schema($light-grid-toolbar);
7+
$material: digest-schema($material-grid-toolbar);
8+
$bootstrap: digest-schema($bootstrap-grid-toolbar);
9+
$fluent: digest-schema($fluent-grid-toolbar);
10+
$indigo: digest-schema($indigo-grid-toolbar);

projects/igniteui-angular/grids/core/src/toolbar/themes/light/list/_index.scss

Lines changed: 0 additions & 6 deletions
This file was deleted.

projects/igniteui-angular/grids/core/src/toolbar/themes/light/list/_tokens.scss

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)