Skip to content

Commit

Permalink
Slider: get rid of excess string literal in testcafe test and move cs…
Browse files Browse the repository at this point in the history
…s variables to colors (DevExpress#26898)
  • Loading branch information
jdvictoria authored Mar 13, 2024
1 parent 963f449 commit 74a93cd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
11 changes: 9 additions & 2 deletions packages/devextreme/scss/widgets/material/slider/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,12 @@ $material-slider-bar-disabled-bg: color.change($base-text-color, $alpha: 0.24) !
* $name 30. Slider tooltip text color
* $type color
*/
$material-slider-tooltip-color: $base-inverted-text-color !default;
$material-slider-inverted-tooltip-color: $base-text-color !default;
$material-slider-tooltip-color: null !default;

@if $mode == "light" {
$material-slider-tooltip-color: $base-inverted-text-color !default;
}

@if $mode == "dark" {
$material-slider-tooltip-color: $base-text-color !default;
}
10 changes: 1 addition & 9 deletions packages/devextreme/scss/widgets/material/slider/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,7 @@ $material-slider-tooltip-width-without-paddings: $material-slider-tooltip-width

.dx-popup-content {
line-height: normal;

@if $mode == "light" {
color: $material-slider-tooltip-color;
}

@if $mode == "dark" {
color: $material-slider-inverted-tooltip-color;
}

color: $material-slider-tooltip-color;
padding: $material-slider-tooltip-popup-content-padding;

.dx-slider-tooltip-position-top & {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test('Slider appearance', async (t) => {

await testScreenshot(t, takeScreenshot, 'slider-appearance.png', { element: '#container' });

await testScreenshot(t, takeScreenshot, 'slider-appearance.png', { element: '#container', theme: `${getFullThemeName().replace('light', 'dark')}` });
await testScreenshot(t, takeScreenshot, 'slider-appearance.png', { element: '#container', theme: getFullThemeName().replace('light', 'dark') });

await t
.expect(compareResults.isValid())
Expand Down

0 comments on commit 74a93cd

Please sign in to comment.