[libadwaita/wip/exalm/stylesheet2: 74/103] stylesheet: Split popover styles into a separate file
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/stylesheet2: 74/103] stylesheet: Split popover styles into a separate file
- Date: Fri, 16 Apr 2021 22:38:46 +0000 (UTC)
commit fb88c98145c05bd7e7856ced26561a7c4ad6e3a9
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Apr 9 13:03:25 2021 +0500
stylesheet: Split popover styles into a separate file
src/stylesheet/_common.scss | 65 -----------------------------------
src/stylesheet/_widgets.scss | 1 +
src/stylesheet/meson.build | 1 +
src/stylesheet/widgets/_popovers.scss | 60 ++++++++++++++++++++++++++++++++
4 files changed, 62 insertions(+), 65 deletions(-)
---
diff --git a/src/stylesheet/_common.scss b/src/stylesheet/_common.scss
index e48b8f4..5fbfb1d 100644
--- a/src/stylesheet/_common.scss
+++ b/src/stylesheet/_common.scss
@@ -237,71 +237,6 @@ editablelabel > stack > text {
}
-/***************
- * Popovers *
- ***************/
-
-popover.background {
- background-color: transparent;
- font: initial; // Decouple the font of popovers from their entry/textview
-
- > arrow,
- > contents {
- $_popover_border: if($variant=='light', transparentize(black, 0.77), transparentize(black, 0.25));
-
- background-color: $menu_color;
- background-clip: padding-box;
- border: 1px solid $_popover_border;
- box-shadow: 0 1px 2px transparentize(black, 0.7);
- }
-
- &:backdrop {
- background-color: transparent;
- }
-
- > contents {
- padding: 8px;
- border-radius: $popover_radius;
-
- > list,
- > .view,
- > toolbar {
- border-style: none;
- background-color: transparent;
- }
-
- separator {
- background-color: mix($bg_color, $borders_color, 30%);
- margin: 3px;
- }
-
- list separator { margin: 0; }
- }
-
- .osd &,
- &.touch-selection,
- &.magnifier {
- background-color: transparent;
-
- > arrow,
- > contents {
- @extend %osd;
-
- border: 1px solid transparentize(white, 0.9);
- box-shadow: none;
- }
- }
-
- &.touch-selection,
- &.magnifier {
- button { @extend %osd_button; }
- }
-}
-
-magnifier {
- background-color: $base_color;
-}
-
/**********************
* Popover Base Menus *
**********************/
diff --git a/src/stylesheet/_widgets.scss b/src/stylesheet/_widgets.scss
index a84bec1..933dce2 100644
--- a/src/stylesheet/_widgets.scss
+++ b/src/stylesheet/_widgets.scss
@@ -3,6 +3,7 @@
@import 'widgets/entries';
@import 'widgets/header-bar';
@import 'widgets/links';
+@import 'widgets/popovers';
@import 'widgets/spinner';
@import 'widgets/spin-button';
@import 'widgets/toolbars';
diff --git a/src/stylesheet/meson.build b/src/stylesheet/meson.build
index c3471c4..0583df7 100644
--- a/src/stylesheet/meson.build
+++ b/src/stylesheet/meson.build
@@ -25,6 +25,7 @@ if not fs.exists('Adwaita-light.css')
'widgets/_entries.scss',
'widgets/_header-bar.scss',
'widgets/_links.scss',
+ 'widgets/_popovers.scss',
'widgets/_spinner.scss',
'widgets/_spin-button.scss',
'widgets/_toolbars.scss',
diff --git a/src/stylesheet/widgets/_popovers.scss b/src/stylesheet/widgets/_popovers.scss
new file mode 100644
index 0000000..7ad73bf
--- /dev/null
+++ b/src/stylesheet/widgets/_popovers.scss
@@ -0,0 +1,60 @@
+popover.background {
+ background-color: transparent;
+ font: initial; // Decouple the font of popovers from their entry/textview
+
+ > arrow,
+ > contents {
+ $_popover_border: if($variant=='light', transparentize(black, 0.77), transparentize(black, 0.25));
+
+ background-color: $menu_color;
+ background-clip: padding-box;
+ border: 1px solid $_popover_border;
+ box-shadow: 0 1px 2px transparentize(black, 0.7);
+ }
+
+ &:backdrop {
+ background-color: transparent;
+ }
+
+ > contents {
+ padding: 8px;
+ border-radius: $popover_radius;
+
+ > list,
+ > .view,
+ > toolbar {
+ border-style: none;
+ background-color: transparent;
+ }
+
+ separator {
+ background-color: mix($bg_color, $borders_color, 30%);
+ margin: 3px;
+ }
+
+ list separator { margin: 0; }
+ }
+
+ .osd &,
+ &.touch-selection,
+ &.magnifier {
+ background-color: transparent;
+
+ > arrow,
+ > contents {
+ @extend %osd;
+
+ border: 1px solid transparentize(white, 0.9);
+ box-shadow: none;
+ }
+ }
+
+ &.touch-selection,
+ &.magnifier {
+ button { @extend %osd_button; }
+ }
+}
+
+magnifier {
+ background-color: $base_color;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]