[libadwaita/wip/exalm/card: 2/2] stylesheet: Add button.opaque style class
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/card: 2/2] stylesheet: Add button.opaque style class
- Date: Tue, 19 Oct 2021 11:54:22 +0000 (UTC)
commit f99e628bc25468b1c485f466854a7726035a7c2d
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Tue Oct 19 16:38:58 2021 +0500
stylesheet: Add button.opaque style class
Have an explicit way to do colored buttons instead of having apps abuse
.suggested-action and .destructive-action.
Fixes https://gitlab.gnome.org/GNOME/libadwaita/-/issues/251
src/stylesheet/widgets/_buttons.scss | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/src/stylesheet/widgets/_buttons.scss b/src/stylesheet/widgets/_buttons.scss
index dd6c06db..b5d6c643 100644
--- a/src/stylesheet/widgets/_buttons.scss
+++ b/src/stylesheet/widgets/_buttons.scss
@@ -145,7 +145,7 @@ button {
}
}
- @at-root %filled_button {
+ @at-root %opaque_button {
box-shadow: none;
@include focus-ring($outer: true, $offset: 1px);
@@ -174,8 +174,15 @@ button {
}
}
+ &.opaque {
+ @extend %opaque_button;
+
+ background-color: gtkmix($bg_color, $fg_color, 85%);
+ color: $fg_color;
+ }
+
&.destructive-action {
- @extend %filled_button;
+ @extend %opaque_button;
color: $destructive_fg_color;
@@ -185,7 +192,7 @@ button {
}
&.suggested-action {
- @extend %filled_button;
+ @extend %opaque_button;
color: $accent_fg_color;
@@ -468,7 +475,7 @@ splitbutton {
&.suggested-action {
> button, > menubutton > button {
- @extend %filled_button;
+ @extend %opaque_button;
color: $accent_fg_color;
@@ -480,7 +487,7 @@ splitbutton {
&.destructive-action {
> button, > menubutton > button {
- @extend %filled_button;
+ @extend %opaque_button;
color: $destructive_fg_color;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]