Adwaita: bring more attention to focus change

- as discussed in https://gitlab.gnome.org/GNOME/gtk/-/issues/2644 it's desirable to bring attention to what's focused. Instead of pressing `alt` just simply changing focus with `tab` can have a similar effect

Extends https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1802
This commit is contained in:
Jakub Steiner 2020-04-30 22:40:21 +02:00
parent e3b9f9a3bf
commit 8165616b3c
2 changed files with 4 additions and 3 deletions

View File

@ -3876,7 +3876,7 @@ colorswatch {
transition: $focus_transition;
@include focus-ring();
@include focus-ring($width: 4px, $offset: -2px);
&:drop(active), & { border-style: none; } // FIXME: implement a proper drop(active) state

View File

@ -10,11 +10,12 @@
//
@mixin focus-ring($target: null, $width: 2px, $offset: -$width, $outer: false) {
& #{$target} {
outline: 0 solid $focus_border_color;
outline-offset: if($outer, $offset, $offset + $width);
outline: 0 solid transparent;
outline-offset: if($outer, $offset + 10px, $offset + $width + 10px);
}
&:focus:focus-visible #{$target} {
outline-color: $focus_border_color;
outline-width: $width;
outline-offset: $offset;
}