[libadwaita/wip/exalm/sidebars: 1/4] Revert "stylesheet: Remove .sidebar border"




commit d090ad0fe9e74370158d96ac3b165f80e3dc7b7a
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sun Oct 24 04:17:20 2021 +0500

    Revert "stylesheet: Remove .sidebar border"
    
    This reverts commit 25ac0df567705c2b69cb3a2df46034fa7304b787.

 doc/migrating-libhandy-1-4-to-libadwaita.md |  5 -----
 src/stylesheet/widgets/_dialogs.scss        |  1 -
 src/stylesheet/widgets/_sidebars.scss       | 25 ++++++++++++++++---------
 3 files changed, 16 insertions(+), 15 deletions(-)
---
diff --git a/doc/migrating-libhandy-1-4-to-libadwaita.md b/doc/migrating-libhandy-1-4-to-libadwaita.md
index b5ceaedc..f3f2f5b3 100644
--- a/doc/migrating-libhandy-1-4-to-libadwaita.md
+++ b/doc/migrating-libhandy-1-4-to-libadwaita.md
@@ -346,11 +346,6 @@ If you were using `@theme_selected_bg_color` as a text color, use
 `@accent_color` instead to make sure the text is readable. You can also use the
 `.accent` style class to apply the correct color.
 
-#### Make sure your sidebars have borders
-
-The `.sidebar` style class doesn't provide a border by default. Instead, use a
-[class@Gtk.Separator] with the style class `.sidebar` manually.
-
 ### Adapt to the `popover.combo` style removal
 
 The `.combo` popover style class has been removed. Use `.menu` instead. You may
diff --git a/src/stylesheet/widgets/_dialogs.scss b/src/stylesheet/widgets/_dialogs.scss
index 3c9107e2..c854ca6c 100644
--- a/src/stylesheet/widgets/_dialogs.scss
+++ b/src/stylesheet/widgets/_dialogs.scss
@@ -31,7 +31,6 @@ window.assistant {
   .sidebar {
     padding: $menu-margin;
     background-clip: padding-box;
-    @extend %sidebar_border;
 
     > label {
       padding: 6px 12px;
diff --git a/src/stylesheet/widgets/_sidebars.scss b/src/stylesheet/widgets/_sidebars.scss
index 3004ce20..4cc83f81 100644
--- a/src/stylesheet/widgets/_sidebars.scss
+++ b/src/stylesheet/widgets/_sidebars.scss
@@ -1,19 +1,26 @@
 .sidebar {
+  &:not(separator) {
+    &:dir(ltr),
+    &.left,
+    &.left:dir(rtl) {
+      border-right: 1px solid $border_color;
+      border-left-style: none;
+    }
+
+    &:dir(rtl),
+    &.right {
+      border-left: 1px solid $border_color;
+      border-right-style: none;
+    }
+  }
+
   listview.view,
   list {
     background-color: transparent;
     color: inherit;
   }
-}
-
-%sidebar_border {
-  &:dir(ltr) {
-    border-right: 1px solid $border_color;
-  }
 
-  &:dir(rtl) {
-    border-left: 1px solid $border_color;
-  }
+  paned & { &.left, &.right, &.left:dir(rtl), &:dir(rtl), &:dir(ltr), & { border-style: none; }}
 }
 
 stacksidebar row {


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