224 lines
6.7 KiB
Diff
224 lines
6.7 KiB
Diff
|
|
From 0138ade4c1b81c5ec5d18e91c7fb55a18c2520ff Mon Sep 17 00:00:00 2001
|
|||
|
|
From: tangjie02 <tangjie02@kylinsec.com.cn>
|
|||
|
|
Date: Fri, 14 Oct 2022 11:47:09 +0800
|
|||
|
|
Subject: [PATCH 2/3] fix(scss): Fix scss warning "Compound selectors may no
|
|||
|
|
longer be extended".
|
|||
|
|
MIME-Version: 1.0
|
|||
|
|
Content-Type: text/plain; charset=UTF-8
|
|||
|
|
Content-Transfer-Encoding: 8bit
|
|||
|
|
|
|||
|
|
- 修复scss告警,新版本scss的extend不支持复合选择器。
|
|||
|
|
|
|||
|
|
Signed-off-by: tangjie02 <tangjie02@kylinsec.com.cn>
|
|||
|
|
---
|
|||
|
|
src/gtk3/widgets/_base.scss | 9 ++++-
|
|||
|
|
src/gtk3/widgets/_button.scss | 69 +++++++++++++++++++++++-----------
|
|||
|
|
src/gtk3/widgets/_link.scss | 2 +-
|
|||
|
|
src/gtk3/widgets/_menus.scss | 3 +-
|
|||
|
|
src/gtk3/widgets/_sidebar.scss | 1 -
|
|||
|
|
5 files changed, 57 insertions(+), 27 deletions(-)
|
|||
|
|
|
|||
|
|
diff --git a/src/gtk3/widgets/_base.scss b/src/gtk3/widgets/_base.scss
|
|||
|
|
index 77c25b8..0949992 100644
|
|||
|
|
--- a/src/gtk3/widgets/_base.scss
|
|||
|
|
+++ b/src/gtk3/widgets/_base.scss
|
|||
|
|
@@ -178,7 +178,7 @@ label {
|
|||
|
|
&:disabled {
|
|||
|
|
color: gtk("@insensitive_fg_color");
|
|||
|
|
selection {
|
|||
|
|
- @extend %selected_items:disabled;
|
|||
|
|
+ color: gtk("@insensitive_selected_fg_color");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
&:backdrop {
|
|||
|
|
@@ -190,7 +190,12 @@ label {
|
|||
|
|
color: gtk("@theme_unfocused_text_color");
|
|||
|
|
|
|||
|
|
selection {
|
|||
|
|
- @extend %selected_items:backdrop;
|
|||
|
|
+ background-color: gtk("@theme_unfocused_selected_bg_color");
|
|||
|
|
+ color: gtk("@theme_unfocused_selected_fg_color");
|
|||
|
|
+
|
|||
|
|
+ &:disabled {
|
|||
|
|
+ color: gtk("@insensitive_unfocused_selected_fg_color");
|
|||
|
|
+ }
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
diff --git a/src/gtk3/widgets/_button.scss b/src/gtk3/widgets/_button.scss
|
|||
|
|
index 37a45d8..7f1c3f0 100644
|
|||
|
|
--- a/src/gtk3/widgets/_button.scss
|
|||
|
|
+++ b/src/gtk3/widgets/_button.scss
|
|||
|
|
@@ -351,10 +351,10 @@ combobox {
|
|||
|
|
&.linked {
|
|||
|
|
button:nth-child(2) {
|
|||
|
|
&:dir(ltr) {
|
|||
|
|
- @extend %linked:last-child;
|
|||
|
|
+ @extend %linked_last_child;
|
|||
|
|
}
|
|||
|
|
&:dir(rtl) {
|
|||
|
|
- @extend %linked:first-child;
|
|||
|
|
+ @extend %linked_first_child;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
@@ -371,14 +371,14 @@ combobox {
|
|||
|
|
} // specificity bump
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
-.linked:not(.vertical) > combobox:first-child > box > button.combo { @extend %linked:first-child; }
|
|||
|
|
-.linked:not(.vertical) > combobox:last-child > box > button.combo { @extend %linked:last-child; }
|
|||
|
|
-.linked:not(.vertical) > combobox:only-child > box > button.combo { @extend %linked:only-child; }
|
|||
|
|
+.linked:not(.vertical) > combobox:first-child > box > button.combo { @extend %linked_first_child; }
|
|||
|
|
+.linked:not(.vertical) > combobox:last-child > box > button.combo { @extend %linked_last_child; }
|
|||
|
|
+.linked:not(.vertical) > combobox:only-child > box > button.combo { @extend %linked_only_child; }
|
|||
|
|
|
|||
|
|
.linked.vertical > combobox > box > button.combo { @extend %linked_vertical_middle; }
|
|||
|
|
-.linked.vertical > combobox:first-child > box > button.combo { @extend %linked_vertical:first-child;}
|
|||
|
|
-.linked.vertical > combobox:last-child > box > button.combo { @extend %linked_vertical:last-child; }
|
|||
|
|
-.linked.vertical > combobox:only-child > box > button.combo { @extend %linked_vertical:only-child; }
|
|||
|
|
+.linked.vertical > combobox:first-child > box > button.combo { @extend %linked_vertical_first_child;}
|
|||
|
|
+.linked.vertical > combobox:last-child > box > button.combo { @extend %linked_vertical_last_child; }
|
|||
|
|
+.linked.vertical > combobox:only-child > box > button.combo { @extend %linked_vertical_only_child; }
|
|||
|
|
|
|||
|
|
%needs_attention {
|
|||
|
|
animation: needs_attention 150ms ease-in;
|
|||
|
|
@@ -409,49 +409,74 @@ combobox {
|
|||
|
|
border-right-style: none;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
+%linked_first_child {
|
|||
|
|
+ border-top-left-radius: $RadiusLittle;
|
|||
|
|
+ border-bottom-left-radius: $RadiusLittle;
|
|||
|
|
+}
|
|||
|
|
+
|
|||
|
|
+%linked_last_child {
|
|||
|
|
+ border-top-right-radius: $RadiusLittle;
|
|||
|
|
+ border-bottom-right-radius: $RadiusLittle;
|
|||
|
|
+ border-right-style: solid;
|
|||
|
|
+}
|
|||
|
|
+
|
|||
|
|
+%linked_only_child {
|
|||
|
|
+ border-radius: $RadiusLittle;
|
|||
|
|
+ border-style: solid;
|
|||
|
|
+}
|
|||
|
|
+
|
|||
|
|
%linked {
|
|||
|
|
@extend %linked_middle;
|
|||
|
|
|
|||
|
|
&:first-child {
|
|||
|
|
- border-top-left-radius: $RadiusLittle;
|
|||
|
|
- border-bottom-left-radius: $RadiusLittle;
|
|||
|
|
+ @extend %linked_first_child;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
&:last-child {
|
|||
|
|
- border-top-right-radius: $RadiusLittle;
|
|||
|
|
- border-bottom-right-radius: $RadiusLittle;
|
|||
|
|
- border-right-style: solid;
|
|||
|
|
+ @extend %linked_last_child;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
&:only-child {
|
|||
|
|
- border-radius: $RadiusLittle;
|
|||
|
|
- border-style: solid;
|
|||
|
|
+ @extend %linked_only_child;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
+
|
|||
|
|
%linked_vertical_middle {
|
|||
|
|
border-style: solid solid none solid;
|
|||
|
|
border-radius: 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
+%linked_vertical_first_child {
|
|||
|
|
+ border-top-left-radius: $RadiusLittle;
|
|||
|
|
+ border-top-right-radius: $RadiusLittle;
|
|||
|
|
+}
|
|||
|
|
+
|
|||
|
|
+%linked_vertical_last_child {
|
|||
|
|
+ border-bottom-left-radius: $RadiusLittle;
|
|||
|
|
+ border-bottom-right-radius: $RadiusLittle;
|
|||
|
|
+ border-style: solid;
|
|||
|
|
+}
|
|||
|
|
+
|
|||
|
|
+%linked_vertical_only_child {
|
|||
|
|
+ border-radius: $RadiusLittle;
|
|||
|
|
+ border-style: solid;
|
|||
|
|
+}
|
|||
|
|
+
|
|||
|
|
%linked_vertical {
|
|||
|
|
@extend %linked_vertical_middle;
|
|||
|
|
|
|||
|
|
&:first-child {
|
|||
|
|
- border-top-left-radius: $RadiusLittle;
|
|||
|
|
- border-top-right-radius: $RadiusLittle;
|
|||
|
|
+ @extend %linked_vertical_first_child;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
&:last-child {
|
|||
|
|
- border-bottom-left-radius: $RadiusLittle;
|
|||
|
|
- border-bottom-right-radius: $RadiusLittle;
|
|||
|
|
- border-style: solid;
|
|||
|
|
+ @extend %linked_vertical_last_child;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
&:only-child {
|
|||
|
|
- border-radius: $RadiusLittle;
|
|||
|
|
- border-style: solid;
|
|||
|
|
+ @extend %linked_vertical_only_child;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
diff --git a/src/gtk3/widgets/_link.scss b/src/gtk3/widgets/_link.scss
|
|||
|
|
index b4b3399..3276400 100644
|
|||
|
|
--- a/src/gtk3/widgets/_link.scss
|
|||
|
|
+++ b/src/gtk3/widgets/_link.scss
|
|||
|
|
@@ -50,7 +50,7 @@ button:link,
|
|||
|
|
button:visited {
|
|||
|
|
@extend %undecorated_button;
|
|||
|
|
|
|||
|
|
- @extend *:link;
|
|||
|
|
+ @extend %link;
|
|||
|
|
|
|||
|
|
text-shadow: none;
|
|||
|
|
|
|||
|
|
diff --git a/src/gtk3/widgets/_menus.scss b/src/gtk3/widgets/_menus.scss
|
|||
|
|
index 785ec76..94390dc 100644
|
|||
|
|
--- a/src/gtk3/widgets/_menus.scss
|
|||
|
|
+++ b/src/gtk3/widgets/_menus.scss
|
|||
|
|
@@ -164,6 +164,7 @@ menuitem {
|
|||
|
|
* Popovers *
|
|||
|
|
***************/
|
|||
|
|
/* menu buttons */
|
|||
|
|
+%modelbutton_flat,
|
|||
|
|
modelbutton.flat,
|
|||
|
|
.menuitem.button.flat {
|
|||
|
|
min-height: 16px;
|
|||
|
|
@@ -254,6 +255,6 @@ popover.background {
|
|||
|
|
|
|||
|
|
checkbutton,
|
|||
|
|
radiobutton {
|
|||
|
|
- @extend modelbutton.flat;
|
|||
|
|
+ @extend %modelbutton_flat;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
\ No newline at end of file
|
|||
|
|
diff --git a/src/gtk3/widgets/_sidebar.scss b/src/gtk3/widgets/_sidebar.scss
|
|||
|
|
index b9c6cd2..b1c07e0 100644
|
|||
|
|
--- a/src/gtk3/widgets/_sidebar.scss
|
|||
|
|
+++ b/src/gtk3/widgets/_sidebar.scss
|
|||
|
|
@@ -71,7 +71,6 @@ placessidebar {
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
@at-root button.sidebar-button {
|
|||
|
|
- @extend %button_basic.flat;
|
|||
|
|
|
|||
|
|
@extend %undecorated_button;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
2.40.1.windows.1
|
|||
|
|
|