Skip to content

Commit

Permalink
Revert removing back-button style
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit committed Feb 14, 2024
1 parent eee70bb commit a6c912c
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/gtk-4.0/widgets/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,43 @@ button {
}
}

// Stopgap since we can't do angled buttons in GtkCSS, and generating all
// the necessary SVGs for light/dark and accent color combinations is
// untenable. Ideally we'd deprecate this in favor of something like a
// Granite.BackButton with custom drawing; until then, stick an icon in it.
&.back-button {
background-repeat: no-repeat no-repeat;
background-size: 16px, cover;

&:dir(ltr) {
background-image:
-gtk-icontheme('go-previous-symbolic'),
linear-gradient(
to bottom,
#{'alpha(@highlight_color, 0.2)'},
rgba(white, 0)
);
padding-left: calc(#{rem(9px)} + 16px);
background-position:
#{rem(6px)} 50%,
center, center;
}

&:dir(rtl) {
background-image:
-gtk-icontheme('go-next-symbolic'),
linear-gradient(
to bottom,
#{'alpha(@highlight_color, 0.2)'},
rgba(white, 0)
);
padding-right: calc(#{rem(9px)} + 16px);
background-position:
calc(100% - #{rem(6px)}) 50%,
center, center;
}
}

&:disabled {
color: $insensitive-fg-color;
}
Expand Down

0 comments on commit a6c912c

Please sign in to comment.