[gtk: 1/2] Adwaita: Fix link styling



commit 47bfa4911898f813dbea536e2b6c898aeabc8488
Author: nana-4 <hnmaigo gmail com>
Date:   Sun Apr 19 15:21:40 2020 +0900

    Adwaita: Fix link styling
    
    - Fix broken visited link styling by avoiding invalid selector
      `:link:visited` - CSS :link and :visited are mutually exclusive.
    - In link button, move %link from the child label to the parent button,
      so that the hover/active effect is applied within the whole button and
      the visited style is applied correctly.
    - Remove invalid selectors `:backdrop:backdrop`.

 gtk/theme/Adwaita/_common.scss | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 8f8b9a0243..f92ae171c9 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -1048,8 +1048,7 @@ list > row button.image-button:not(.flat) {
  *********/
 
 %link,
-button:link,
-link:link {
+link {
   color: $link_color;
   text-decoration: underline;
 
@@ -1074,19 +1073,17 @@ link:link {
 
   &:disabled, &:disabled:backdrop { color: transparentize(desaturate($link_color, 100%), 0.2); }
 
-  &:backdrop { &:backdrop:hover, &:backdrop:hover:selected, & { color: transparentize($link_color, 0.1); }}
+  &:backdrop { color: transparentize($link_color, 0.1); }
 
   @at-root %link_selected,
   &:selected,
   *:selected & { color: mix($selected_fg_color, $link_color, 80%); }
 }
 
-button:link,
-button:visited {
-  @extend %undecorated_button;
-
-  text-shadow: none;
+button.link {
+  @extend %link;
 
+  &,
   &:hover,
   &:active,
   &:checked {
@@ -1096,7 +1093,7 @@ button:visited {
   }
 
   > label {
-    @extend %link;
+    text-decoration: underline;
   }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]