Adwaita: restyle entry-tag

Fix the sizing and spacing, blue tags for the bright variant,
similar to what gnome-documents was shipping, and inverted gray
tags for the dark variant, not vanishing on hover.
This commit is contained in:
Lapo Calamandrei 2017-05-11 14:36:57 +02:00
parent 9546673d33
commit 3a1946b076

View File

@ -428,14 +428,55 @@ treeview entry {
}
.entry-tag {
@include button(undecorated);
background-color: darken($base_color,10%);
&:hover { background-color: $base_color; }
.button {
@include button(undecorated);
// sizing
padding: 5px;
margin-top: 2px;
margin-bottom: 2px;
// side margins: compensate the entry padding with a negative margin
// then the negative margin itself
:dir(ltr) & {
margin-left: 8px;
margin-right: -5px;
}
:dir(rtl) & {
margin-left: -5px;
margin-right: 8px;
}
border-style: none;
$_entry_tag_color: if($variant=='light', $selected_fg_color, $base_color);
color: $_entry_tag_color;
$_entry_tag_bg: if($variant=='light', $selected_bg_color, mix($fg_color, $base_color, 50%));
background-color: $_entry_tag_bg;
&:hover {
background-color: lighten($_entry_tag_bg, 10%);
}
:backdrop & {
color: $backdrop_base_color;
background-color: if($variant=='light', $selected_bg_color,
mix($backdrop_fg_color, $backdrop_base_color, 50%));
}
&.button {
background-color: transparent;
color: transparentize($_entry_tag_color, 0.3);
}
:not(:backdrop) &.button {
&:hover {
border: 1px solid $_entry_tag_bg;
color: $_entry_tag_color;
}
&:active {
background-color: $_entry_tag_bg;
color: transparentize($_entry_tag_color, 0.3);
}
}
}