summaryrefslogtreecommitdiff
path: root/gtk/theme/Adwaita/_common.scss
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/theme/Adwaita/_common.scss')
-rw-r--r--gtk/theme/Adwaita/_common.scss64
1 files changed, 28 insertions, 36 deletions
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 6ba6355d81..d6a0534117 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -2779,7 +2779,6 @@ treeview.view radio:selected { &:focus, & { @extend %radio; }} // This is a work
scale {
// sizing
-
$_marks_lenght: 6px;
$_marks_distance: 6px;
@@ -2792,6 +2791,7 @@ scale {
highlight { margin: -1px; }
// the slider is inside the trough, so to have make it bigger there's a negative margin
+
slider {
min-height: 18px;
min-width: 18px;
@@ -2959,17 +2959,17 @@ scale {
@each $dir_class, $dir_infix in ('horizontal', 'horz'),
('vertical', 'vert') {
- @each $marks_infix, $nth_child in ('scale-has-marks-above', ':last-child:not(:only-child)'),
- ('scale-has-marks-below', ':first-child:not(:only-child)') {
+ @each $marks_infix, $marks_class in ('scale-has-marks-above', 'marks-before:not(.marks-after)'),
+ ('scale-has-marks-below', 'marks-after:not(.marks-before)') {
@each $state, $state_infix in ('', ''),
- (':hover', '-hover'),
- (':active', '-active'),
- (':disabled', '-insensitive'),
- (':backdrop', '-backdrop'),
- (':backdrop:disabled', '-backdrop-insensitive') {
- &.#{$dir_class} {
- %#{$marks_infix}-#{$dir_infix},
- contents#{$nth_child} > trough > slider {
+ (':hover', '-hover'),
+ (':active', '-active'),
+ (':disabled', '-insensitive'),
+ (':backdrop', '-backdrop'),
+ (':backdrop:disabled', '-backdrop-insensitive') {
+ &.#{$dir_class}.#{$marks_class} {
+
+ slider {
&#{$state} {
// an asymmetric slider asset is used here, so the margins are uneven, the smaller
// margin is set on the point side.
@@ -2981,6 +2981,7 @@ scale {
background-image: -gtk-scaled(url('#{$_scale_asset}.png'), url('#{$_scale_asset}@2.png'));
$_scale_slider_bg_pos: bottom;
+
@if $dir_class == 'horizontal' {
min-height: 26px;
min-width: 22px;
@@ -3017,8 +3018,7 @@ scale {
}
}
- @at-root %#{$marks_infix}-#{$dir_infix}-fine-tune,
- &.fine-tune contents#{$nth_child} > trough > slider {
+ &.fine-tune slider {
// bigger negative margins to make the trough grow here as well
margin: -7px;
@@ -3059,11 +3059,11 @@ scale {
}
slider {
- &:hover, &:backdrop, &:disabled, &:backdrop:disabled, & {
- @extend %scale-has-marks-above-horz;
-
- margin-bottom: -15px;
- margin-top: 6px;
+ &:dir(ltr), &:dir(rtl) { // specificity bumb
+ &:hover, &:backdrop, &:disabled, &:backdrop:disabled, & {
+ margin-bottom: -15px;
+ margin-top: 6px;
+ }
}
}
}
@@ -3081,8 +3081,6 @@ scale {
slider {
&:hover, &:backdrop, &:disabled, &:backdrop:disabled, & {
- @extend %scale-has-marks-below-vert;
-
margin-left: -15px;
margin-right: 6px;
}
@@ -3101,8 +3099,6 @@ scale {
slider {
&:hover, &:backdrop, &:disabled, &:backdrop:disabled, & {
- @extend %scale-has-marks-above-vert;
-
margin-right: -15px;
margin-left: 6px;
}
@@ -3112,18 +3108,18 @@ scale {
&.fine-tune {
&.horizontal {
- padding: 0 0 12px 0;
+ &:dir(ltr), &:dir(rtl) { // specificity bump
+ padding: 0 0 12px 0;
- trough {
- padding-bottom: 7px;
- background-position: 0 -6px;
- }
-
- slider {
- @extend %scale-has-marks-above-horz-fine-tune;
+ trough {
+ padding-bottom: 7px;
+ background-position: 0 -6px;
+ }
- margin-bottom: -15px;
- margin-top: 6px;
+ slider {
+ margin-bottom: -15px;
+ margin-top: 6px;
+ }
}
}
@@ -3137,8 +3133,6 @@ scale {
}
slider {
- @extend %scale-has-marks-below-vert-fine-tune;
-
margin-left: -15px;
margin-right: 6px;
}
@@ -3153,8 +3147,6 @@ scale {
}
slider {
- @extend %scale-has-marks-above-vert-fine-tune;
-
margin-right: -15px;
margin-left: 6px;
}