123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- /****************
- * Text Entries *
- ****************/
- %entry,
- entry {
- %entry_basic, & {
- min-height: 32px;
- padding-left: 8px;
- padding-right: 8px;
- border: 1px solid;
- border-radius: 3px;
- transition: all 200ms $ease-out-quad;
- @include entry(normal);
- image { // icons inside the entry
- &.left { padding-left: 0; padding-right: 6px; }
- &.right { padding-left: 6px; padding-right: 0; }
- }
- undershoot {
- &.left { @include undershoot(left); }
- &.right { @include undershoot(right); }
- }
- &.flat {
- &:focus-within, & {
- min-height: 0;
- padding: 2px;
- background-image: none;
- border-color: transparent;
- box-shadow: none;
- border-radius: 0;
- }
- }
- &:focus-within { @include entry(focus); }
- &:disabled { @include entry(insensitive); }
- &:backdrop {
- @include entry(backdrop);
- transition: $backdrop_transition;
- }
- &:backdrop:disabled { @include entry(backdrop-insensitive); }
- selection { &:focus, & { @extend %selected_items; }}
- // entry error and warning style
- @each $e_type, $e_color in (error, $error_color),
- (warning, $warning_color) {
- &.#{$e_type} {
- @include entry(normal);
- color: $e_color;
- border-color: entry_focus_border($e_color);
- &:focus-within { @include entry(focus, $e_color); }
- &:selected { &:focus, & { background-color: $e_color; }}
- }
- }
- & image { // entry icons colors
- color: mix($fg_color, $base_color, 80%);
- &:hover { color: $fg_color; }
- &:active { color: $selected_bg_color; }
- &:backdrop { color: mix($backdrop_fg_color, $backdrop_base_color, 80%); }
- }
- &:drop(active) {
- &:focus-within, & {
- border-color: $drop_target_color;
- box-shadow: inset 0 0 0 1px $drop_target_color;
- }
- }
- .osd & {
- @include entry(osd);
- &:focus-within { @include entry(osd-focus); }
- &:backdrop { @include entry(osd-backdrop); }
- &:disabled { @include entry(osd-insensitive); }
- }
- }
- progress {
- margin: 2px -6px;
- background-color: transparent;
- background-image: none;
- border-radius: 0;
- border-width: 0 0 2px;
- border-color: $selected_bg_color;
- border-style: solid;
- box-shadow: none;
- &:backdrop { background-color: transparent; }
- }
- // linked entries
- .linked:not(.vertical) > & { @extend %linked; }
- .linked:not(.vertical) > &:focus-within + &,
- .linked:not(.vertical) > &:focus-within + button,
- .linked:not(.vertical) > &:focus-within + combobox > box > button.combo { border-left-color: entry_focus_border(); }
- .linked:not(.vertical) > &:focus-within { border-color: entry_focus_border(); }
- .linked:not(.vertical) > &:drop(active) + &,
- .linked:not(.vertical) > &:drop(active) + button,
- .linked:not(.vertical) > &:drop(active) + combobox > box > button.combo { border-left-color: $drop_target_color; }
- // Vertically linked entries
- // FIXME: take care of "colored" entries
- .linked.vertical > & {
- @extend %linked_vertical;
- // brighter border between linked entries
- &:not(:disabled) + entry:not(:disabled),
- &:not(:disabled) + %entry:not(:disabled) {
- border-top-color: mix($borders_color, $base_color, 30%);
- background-image: linear-gradient(to bottom, $base_color, $base_color);
- &:backdrop {
- border-top-color: mix($backdrop_borders_color, $backdrop_base_color, 30%);
- background-image: linear-gradient(to bottom, $backdrop_base_color, $backdrop_base_color);
- }
- }
- // brighter border between linked insensitive entries
- &:disabled + %entry:disabled,
- &:disabled + entry:disabled { border-top-color: mix($borders_color, $base_color, 30%); }
- // color back the top border of a linked focused entry following another entry and add back the focus shadow.
- // :not(:only-child) is a specificity bump hack.
- + %entry:focus:not(:only-child),
- + entry:focus:not(:only-child) { border-top-color: entry_focus_border(); }
- + %entry:drop(active):not(:only-child),
- + entry:drop(active):not(:only-child) { border-top-color: $drop_target_color; }
- // this takes care of coloring the top border of the focused entry subsequent widget.
- // :not(:only-child) is a specificity bump hack.
- &:focus:not(:only-child) {
- + %entry,
- + entry,
- + button,
- + combobox > box > button.combo { border-top-color: entry_focus_border(); }
- }
- &:drop(active):not(:only-child) {
- + %entry,
- + entry,
- + button,
- + combobox > box > button.combo { border-top-color: $drop_target_color; }
- }
- }
- }
- treeview entry {
- &:focus-within {
- &:dir(rtl), &:dir(ltr) { // specificity bump hack
- background-color: $base_color;
- transition-property: color, background;
- }
- }
- &.flat, & {
- border-radius: 0;
- background-image: none;
- background-color: $base_color;
- &:focus-within { border-color: $selected_bg_color; }
- }
- }
|