Skip to content

Commit fbc5bac

Browse files
committed
refactor(samples): use tokens mixin for styling samples
1 parent 38f980e commit fbc5bac

File tree

102 files changed

+414
-462
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+414
-462
lines changed

src/app/data-display/badge/badge-styling-sample/badge-styling-sample.component.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ $custom-badge-theme: badge-theme(
66
$border-radius: 4px
77
);
88

9-
@include tokens($custom-badge-theme, $mode: 'scoped');
9+
:host {
10+
@include tokens($custom-badge-theme);
11+
}

src/app/data-display/chip/chip-styling/chip-styling.component.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,6 @@ igx-chip {
4444
// $border-radius: rem(5px)
4545
// );
4646

47-
// @include tokens($custom-chip-theme, $mode: 'scoped');
47+
// :host {
48+
// @include tokens($custom-chip-theme);
49+
// }

src/app/data-display/circular-progressbar/circular-styling-sample/circular-styling-sample.component.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ $custom-theme: progress-circular-theme(
55
$diameter: 50px,
66
);
77

8-
@include css-vars($custom-theme);
9-
108
igx-circular-bar {
9+
@include tokens($custom-theme);
1110
margin: 20px;
1211
}

src/app/data-display/icon/icon-styling-sample/icon-styling-sample.component.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ $custom-icon-theme: icon-theme(
66
$disabled-color: #494949
77
);
88

9-
@include css-vars($custom-icon-theme);
10-
9+
:host {
10+
@include tokens($custom-icon-theme);
11+
}

src/app/data-display/linear-progressbar/linear-progressbar-styling-sample/linear-progressbar-styling-sample.component.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ $custom-theme: progress-linear-theme(
66
$text-color: #ecaa53,
77
);
88

9-
@include css-vars($custom-theme);
9+
:host {
10+
@include tokens($custom-theme);
11+
}

src/app/data-display/text-highlight/text-highlight-style/text-highlight-style.component.scss

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,14 @@ $dark-highlight: highlight-theme(
88
$active-color: #ffcd0f,
99
);
1010

11-
:host {
12-
::ng-deep {
13-
@include css-vars($dark-highlight);
14-
11+
:host ::ng-deep {
12+
@include tokens($dark-highlight);
13+
1514
.custom-highlight {
16-
border: 1px solid #ffcd0f;
17-
}
18-
15+
border: 1px solid #ffcd0f;
16+
}
17+
1918
.custom-active-highlight {
20-
box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.75);
19+
box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.75);
2120
}
22-
}
2321
}
24-

src/app/data-entries/buttonGroup/button-group-style/button-group-style.component.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ $custom-button-group: button-group-theme(
55
$item-background: #57a5cd,
66
);
77

8-
@include css-vars($custom-button-group);
9-
8+
:host {
9+
@include tokens($custom-button-group);
10+
}

src/app/data-entries/buttons/buttons-style/buttons-style.component.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,10 @@ $list: (
232232
// );
233233

234234
// .button-sample {
235-
// @include css-vars($custom-contained-theme);
236-
// @include css-vars($custom-outlined-theme);
235+
// @include tokens($custom-contained-theme);
236+
// @include tokens($custom-outlined-theme);
237237
// }
238238

239239
// .button-sample.filled {
240-
// @include css-vars($custom-flat-theme);
241-
// }
240+
// @include tokens($custom-flat-theme);
241+
// }

src/app/data-entries/checkbox/checkbox-styling/checkbox-styling.component.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ igx-checkbox:hover {
3131
// $empty-color: #131e29,
3232
// $border-radius: rem(4px),
3333
// );
34-
//
35-
// @include css-vars($custom-checkbox-theme);
36-
//
34+
35+
// :host {
36+
// @include tokens($custom-checkbox-theme);
37+
// }

src/app/data-entries/dropdown/dropdown-styling/dropdown-styling.component.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ $custom-drop-down-theme: drop-down-theme(
88
$selected-item-background: #345779,
99
);
1010

11-
.drop-down__scroll-container {
12-
@include css-vars($custom-drop-down-theme);
11+
:host {
12+
@include tokens($custom-drop-down-theme);
1313
}

0 commit comments

Comments
 (0)