numix-gtk-theme/gtk-3.0/scss/widgets/_entry.scss

85 lines
1.8 KiB
SCSS
Raw Normal View History

2014-12-20 11:12:58 +00:00
/*********
! Entry *
**********/
2014-07-05 19:54:53 +00:00
2014-12-20 11:12:58 +00:00
%linked_entry {
2015-08-06 19:39:22 +00:00
border-width: 1px;
border-radius: 0;
border-right-width: 0;
border-left-width: 0;
&:first-child {
border-width: 1px;
border-radius: $roundness;
border-right-width: 0;
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}
&:last-child {
border-width: 1px;
border-radius: $roundness;
border-left-width: 0;
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
&:only-child {
border-width: 1px;
border-radius: $roundness;
}
2014-07-05 19:54:53 +00:00
}
2015-05-31 16:20:35 +00:00
%entry {
2015-08-06 19:39:22 +00:00
padding: ($spacing - 1px) $spacing;
border-width: 1px;
border-style: solid;
border-radius: $roundness;
transition: border 150ms ease;
2015-08-16 13:28:10 +00:00
box-shadow: inset 1px 1px fade-out($dark_shadow, .14),
inset -1px 0 fade-out($dark_shadow, .14);
2015-05-31 16:20:35 +00:00
&:focus, &:hover, &:active { transition: none; }
2014-07-05 19:54:53 +00:00
2015-08-06 19:39:22 +00:00
&:selected, &:selected:focus {
background-color: $selected_bg_color;
color: $selected_fg_color;
}
2014-07-05 19:54:53 +00:00
2015-08-06 19:39:22 +00:00
&:insensitive { box-shadow: none; }
2014-07-05 19:54:53 +00:00
2015-08-06 19:39:22 +00:00
&.progressbar {
@include linear-gradient($selected_bg_color);
2014-07-05 19:54:53 +00:00
2015-08-06 19:39:22 +00:00
border-width: 0;
border-radius: $roundness;
color: $selected_fg_color;
}
2014-07-05 19:54:53 +00:00
2015-08-06 19:39:22 +00:00
&.image.left { padding-right: $spacing; }
2014-07-05 19:54:53 +00:00
}
2015-05-31 16:20:35 +00:00
@mixin entry($bg, $fg) {
2015-08-06 19:39:22 +00:00
@extend %entry;
@include linear-gradient($bg, to top);
@include border($bg);
2015-05-31 16:20:35 +00:00
2015-08-06 19:39:22 +00:00
color: $fg;
2015-05-31 16:20:35 +00:00
2015-08-06 19:39:22 +00:00
&:focus, &:active { border-color: $selected_bg_color; }
2015-05-31 16:20:35 +00:00
2015-08-06 19:39:22 +00:00
&:insensitive {
@include linear-gradient(shade($bg, .9), to top);
2015-05-31 16:20:35 +00:00
2015-08-06 19:39:22 +00:00
color: mix($bg, $fg, .5);
}
2015-05-31 16:20:35 +00:00
}
@include exports("entry") {
2015-08-06 19:39:22 +00:00
.entry {
@include entry($base_color, $text_color);
2014-12-20 11:12:58 +00:00
2015-08-06 19:39:22 +00:00
&.linked, .linked & { @extend %linked_entry; }
}
}