Skip to content

Commit c611ec5

Browse files
committed
refactor(vhelper): use custom property syntax
1 parent 4e4c73d commit c611ec5

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

projects/igniteui-angular/src/lib/core/styles/components/_common/_igx-vhelper.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
position: absolute;
1313
top: 0;
1414
inset-inline-end: 0;
15-
width: var(--igx-vhelper--scrollbar-size);
15+
width: var(--vhelper-scrollbar-size);
1616
}
1717

1818
%vhelper--horizontal {

projects/igniteui-angular/src/lib/core/styles/components/drop-down/_drop-down-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@
244244
position: relative;
245245

246246
igx-display-container {
247-
padding-inline-end: var(--igx-vhelper--scrollbar-size, 0);
247+
padding-inline-end: var(--vhelper-scrollbar-size, 0)
248248
}
249249
}
250250

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@
124124
inherits: true;
125125
}
126126

127+
@property --vhelper-scollbar-size {
128+
syntax: '<integer>';
129+
initial-value: 0;
130+
inherits: true;
131+
}
132+
127133
// Component styles
128134
@include ripple.component();
129135
@include action-strip.component();

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@
9595
--ig-spacing-block-large: 1;
9696
}
9797

98-
#{$scope} {
99-
--igx-vhelper-scrollbar-size: 1rem;
100-
}
101-
10298
@if not(list.index($exclude, 'palette')) {
10399
@include palette($palette);
104100
}

projects/igniteui-angular/src/lib/directives/for-of/virtual.helper.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ export class VirtualHelperComponent extends VirtualHelperBaseDirective implement
1313
@HostBinding('scrollTop')
1414
public scrollTop;
1515

16-
@HostBinding('style.--igx-vhelper--scrollbar-size')
16+
@HostBinding('style.--vhelper-scrollbar-size')
1717
public get scrollbarSize(): string {
1818
const value = `${this.scrollNativeSize}px`;
19-
this.document.documentElement.style.setProperty('--igx-vhelper--scrollbar-size', value);
19+
this.document.documentElement.style.setProperty('--vhelper-scrollbar-size', value);
2020
return value;
2121
}
2222

0 commit comments

Comments
 (0)