From 2b83a4bd1e67225a3aef85cf76192805abd7487b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Wed, 6 Dec 2023 12:03:21 -0800 Subject: [PATCH 1/2] Styles/Button: add .link style with image --- lib/Styles/Gtk/Button.scss | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lib/Styles/Gtk/Button.scss b/lib/Styles/Gtk/Button.scss index de8d76465..42103eb2f 100644 --- a/lib/Styles/Gtk/Button.scss +++ b/lib/Styles/Gtk/Button.scss @@ -36,6 +36,28 @@ button { } } + &.text-button.link label { + background-repeat: no-repeat; + background-size: rem(16px); + + &:hover { + // FIXME: might be a GTK bug to need `double` for underline to show + text-decoration: underline double; + } + + &:dir(ltr) { + background-image: -gtk-icontheme('adw-external-link-symbolic'); + padding-right: calc(#{rem(6px)} + #{rem(16px)}); + background-position: right calc(50% + 0.5px); + } + + &:dir(rtl) { + background-image: -gtk-icontheme('adw-external-link-symbolic-rtl'); + padding-left: calc(#{rem(6px)} + #{rem(16px)}); + background-position: left calc(50% + 0.5px); + } + } + &.circular { // Not 50% because that creates a squished ellipse for non-squares widgets border-radius: 9999px; From 7913efd9f3543b81477ca373983a7e26af9a07ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Wed, 6 Dec 2023 12:05:33 -0800 Subject: [PATCH 2/2] Just underline for now --- lib/Styles/Gtk/Button.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Styles/Gtk/Button.scss b/lib/Styles/Gtk/Button.scss index 42103eb2f..0a066c28c 100644 --- a/lib/Styles/Gtk/Button.scss +++ b/lib/Styles/Gtk/Button.scss @@ -42,7 +42,7 @@ button { &:hover { // FIXME: might be a GTK bug to need `double` for underline to show - text-decoration: underline double; + text-decoration: underline; } &:dir(ltr) {