[libadwaita/wip/exalm/stylesheet2: 97/103] stylesheet: Split label styles into a separate file




commit 0ff966ba7bbb731a283f86554cc63c64cb724841
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Apr 9 14:23:28 2021 +0500

    stylesheet: Split label styles into a separate file

 src/stylesheet/_common.scss         | 83 ---------------------------------
 src/stylesheet/_widgets.scss        |  1 +
 src/stylesheet/meson.build          |  1 +
 src/stylesheet/widgets/_labels.scss | 92 +++++++++++++++++++++++++++++++++++++
 4 files changed, 94 insertions(+), 83 deletions(-)
---
diff --git a/src/stylesheet/_common.scss b/src/stylesheet/_common.scss
index e853970..21f2896 100644
--- a/src/stylesheet/_common.scss
+++ b/src/stylesheet/_common.scss
@@ -37,38 +37,6 @@ dnd {
   -gtk-icon-size: 32px;
 }
 
-label {
-  @include focus-ring();
-
-  &.separator {
-    @extend .dim-label;
-  }
-
-  &:selected { @extend %nobg_selected_items; }
-
-  > selection {
-    background-color: $selected_bg_color;
-    color: $selected_fg_color;
-  }
-
-  &:disabled {
-    color: $insensitive_fg_color;
-
-    button & { color: inherit; }
-
-    > selection { @extend %selected_items_disabled; }
-  }
-
-  &.error {
-   color: $error_color;
-   &:disabled { color: transparentize($error_color,0.5); }
-  }
-}
-
-.dim-label {
-  opacity: $dim_label_opacity;
-}
-
 window.assistant {
   .sidebar {
     padding: $menu-margin;
@@ -97,55 +65,6 @@ window.aboutdialog image.large-icons {
   background-clip: padding-box;
 }
 
-/**********************
- * General Typography *
- **********************/
-
-.large-title {
-   font-weight: 300;
-   font-size: 24pt;
-}
-.title-1 {
-   font-weight: 800;
-   font-size: 20pt;
-}
-.title-2 {
-   font-weight: 800;
-   font-size: 15pt;
-}
-.title-3 {
-   font-weight: 700;
-   font-size: 15pt;
-}
-.title-4 {
-   font-weight: 700;
-   font-size: 13pt;
-}
-.heading {
-   font-weight: 700;
-   font-size: 11pt;
-}
-.body {
-   font-weight: 400;
-   font-size: 11pt;
-}
-.caption-heading {
-   font-weight: 700;
-   font-size: 9pt;
-}
-.caption {
-   font-weight: 400;
-   font-size: 9pt;
-}
-
-/*******************
- * Editable Labels *
- *******************/
-editablelabel > stack > text {
-  @include entry(normal);
-}
-
-
 /****************
  * Print dialog *
 *****************/
@@ -261,8 +180,6 @@ video {
   }
 }
 
-.monospace { font-family: monospace; }
-
 :not(window):drop(active):focus,
 :not(window):drop(active) { // FIXME needs to be done widget by widget, this wildcard should really die
   border-color: $drop_target_color;
diff --git a/src/stylesheet/_widgets.scss b/src/stylesheet/_widgets.scss
index 1581c11..a44cfd6 100644
--- a/src/stylesheet/_widgets.scss
+++ b/src/stylesheet/_widgets.scss
@@ -8,6 +8,7 @@
 @import 'widgets/expanders';
 @import 'widgets/file-chooser';
 @import 'widgets/header-bar';
+@import 'widgets/labels';
 @import 'widgets/level-bar';
 @import 'widgets/links';
 @import 'widgets/lists';
diff --git a/src/stylesheet/meson.build b/src/stylesheet/meson.build
index 903a87d..06f6fe1 100644
--- a/src/stylesheet/meson.build
+++ b/src/stylesheet/meson.build
@@ -30,6 +30,7 @@ if not fs.exists('Adwaita-light.css')
       'widgets/_expanders.scss',
       'widgets/_file-chooser.scss',
       'widgets/_header-bar.scss',
+      'widgets/_labels.scss',
       'widgets/_level-bar.scss',
       'widgets/_links.scss',
       'widgets/_lists.scss',
diff --git a/src/stylesheet/widgets/_labels.scss b/src/stylesheet/widgets/_labels.scss
new file mode 100644
index 0000000..91cd0fe
--- /dev/null
+++ b/src/stylesheet/widgets/_labels.scss
@@ -0,0 +1,92 @@
+label {
+  @include focus-ring();
+
+  &.separator {
+    @extend .dim-label;
+  }
+
+  &:selected { @extend %nobg_selected_items; }
+
+  > selection {
+    background-color: $selected_bg_color;
+    color: $selected_fg_color;
+  }
+
+  &:disabled {
+    color: $insensitive_fg_color;
+
+    button & { color: inherit; }
+
+    > selection { @extend %selected_items_disabled; }
+  }
+
+  &.error {
+   color: $error_color;
+   &:disabled { color: transparentize($error_color,0.5); }
+  }
+}
+
+.dim-label {
+  opacity: $dim_label_opacity;
+}
+
+/**********************
+ * General Typography *
+ **********************/
+
+.large-title {
+  font-weight: 300;
+  font-size: 24pt;
+}
+
+.title-1 {
+  font-weight: 800;
+  font-size: 20pt;
+}
+
+.title-2 {
+  font-weight: 800;
+  font-size: 15pt;
+}
+
+.title-3 {
+  font-weight: 700;
+  font-size: 15pt;
+}
+
+.title-4 {
+  font-weight: 700;
+  font-size: 13pt;
+}
+
+.heading {
+  font-weight: 700;
+  font-size: 11pt;
+}
+
+.body {
+  font-weight: 400;
+  font-size: 11pt;
+}
+
+.caption-heading {
+  font-weight: 700;
+  font-size: 9pt;
+}
+
+.caption {
+  font-weight: 400;
+  font-size: 9pt;
+}
+
+.monospace {
+  font-family: monospace;
+}
+
+/*******************
+ * Editable Labels *
+ *******************/
+
+editablelabel > stack > text {
+  @include entry(normal);
+}


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