[gnome-shell] theme: Simplify .search-section-content items styling



commit fc4dfa11c397c85632ec1ff3783258121213033b
Author: nana-4 <hnmaigo gmail com>
Date:   Sat Jan 25 18:11:28 2020 +0900

    theme: Simplify .search-section-content items styling
    
    This reduces duplicate code in .search-provider-icon and
    .list-search-result by using %search-section-content-item
    to improve maintainability.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/957

 .../gnome-shell-sass/widgets/_search-results.scss  | 52 ++++++++--------------
 1 file changed, 18 insertions(+), 34 deletions(-)
---
diff --git a/data/theme/gnome-shell-sass/widgets/_search-results.scss 
b/data/theme/gnome-shell-sass/widgets/_search-results.scss
index 1c53abfc2d..b067f47763 100644
--- a/data/theme/gnome-shell-sass/widgets/_search-results.scss
+++ b/data/theme/gnome-shell-sass/widgets/_search-results.scss
@@ -34,6 +34,22 @@
   spacing: 0;
 }
 
+%search-section-content-item {
+  @extend %icon_tile;
+
+  &:focus,
+  &:hover,
+  &:selected {
+    background-color: transparentize($osd_fg_color, .9);
+    transition-duration: 200ms;
+  }
+
+  &:active,
+  &:checked {
+    background-color: transparentize(darken($osd_bg_color, 10%), .1);
+  }
+}
+
 // "no results" text
 .search-statustext {
   @extend %status_text;
@@ -46,24 +62,9 @@
 
 // search result provider
 .search-provider-icon {
-  @extend %icon_tile;
-
-  padding: $base_padding;
-  spacing: 0;
+  @extend %search-section-content-item;
   margin-right: $base_margin * 2;
 
-  &:focus,
-  &:selected,
-  &:hover {
-    background-color: transparentize($osd_fg_color,.9);
-    transition-duration: 200ms;
-  }
-
-  &:active,
-  &:checked {
-    background-color: transparentize(darken($osd_bg_color,10%),.1);
-  }
-
   // content
   .list-search-provider-content {
     spacing: $base_spacing * 2;
@@ -85,23 +86,7 @@
 
 // search result listitem
 .list-search-result {
-  @extend %icon_tile;
-  spacing: 0;
-  padding: $base_padding;
-  color: $osd_fg_color;
-
-  border-radius: $base_border_radius + 2px;
-
-  &:focus,
-  &:selected,
-  &:hover {
-    background-color: transparentize($osd_fg_color,.9);
-    transition-duration: 200ms;
-  }
-  &:active,
-  &:checked {
-    background-color: transparentize(darken($osd_bg_color,10%),.1);
-  }
+  @extend %search-section-content-item;
 
   // content
   .list-search-result-content {
@@ -110,7 +95,6 @@
 
   // list item title
   .list-search-result-title {
-    color: $osd_fg_color;
     spacing: $base_spacing * 2;
     padding-right: $base_padding;
     // font-weight: bold;


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