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.scss22
1 files changed, 22 insertions, 0 deletions
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 49d5ef46bb..24cfeb2fb0 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -770,6 +770,28 @@ button {
-gtk-outline-radius: 9999px;
label { padding: 0; }
+
+ // the followind code is needed since we use a darker bottom border on buttons, which looks pretty
+ // bad with a 100% border radius (see https://bugzilla.gnome.org/show_bug.cgi?id=771205 for details),
+ // so on relevant states we an additional background-image with a gradient clipped on the border-box,
+ // so setting a transparent border would reveal it.
+ // FIXME: take care of colored circular button.
+ $_border_bg: linear-gradient(to top, $alt-borders-color 25%, $borders-color 50%);
+
+ &:not(.flat):not(:checked):not(:active):not(:disabled):not(:backdrop) {
+ @include button(normal);
+ background-image: $button_fill, $_border_bg;
+ border-color: transparent;
+ }
+
+ &:hover:not(:checked):not(:active):not(:disabled):not(:backdrop) {
+ @include button(hover);
+ background-image: $button_fill, $_border_bg;
+ border-color: transparent;
+ }
+
+ background-origin: padding-box, border-box;
+ background-clip: padding-box, border-box;
}
}