Merge branch 'wip/jimmac/emphasize-focus-change' into 'master'

Adwaita: bring more attention to focus change

See merge request GNOME/gtk!1803
This commit is contained in:
Jakub Steiner 2020-05-04 08:49:40 +00:00
commit ab0ad4a0d7
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;
}