mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
Merge branch 'wip/jimmac/focus-tabs' into 'master'
Adwaita: don't focus outline tabs with mouse Closes #2721 See merge request GNOME/gtk!1901
This commit is contained in:
commit
c025a569a9
@ -292,7 +292,7 @@ entry {
|
||||
|
||||
@include entry(normal);
|
||||
|
||||
@include focus-ring($within: true);
|
||||
@include focus-ring($focus-state: 'focus-within');
|
||||
|
||||
> image { // icons inside the entry
|
||||
&.left { margin-right: 6px; }
|
||||
@ -342,7 +342,7 @@ entry {
|
||||
&.#{$e_type} {
|
||||
color: $e_color;
|
||||
|
||||
@include focus-ring($within: true, $fc: transparentize($e_color, 0.5));
|
||||
@include focus-ring($focus-state: 'focus-within', $fc: transparentize($e_color, 0.5));
|
||||
|
||||
&:focus-within { @include entry(focus, $e_color); }
|
||||
|
||||
@ -1881,7 +1881,7 @@ popover.background {
|
||||
* Notebooks *
|
||||
*************/
|
||||
notebook {
|
||||
@include focus-ring("> header > tabs > tab", $offset: -2px, $within: true);
|
||||
@include focus-ring("> header > tabs > tab:checked", $offset: -2px, $focus-state: 'focus-within:focus-visible');
|
||||
|
||||
> header {
|
||||
padding: 1px;
|
||||
|
@ -9,14 +9,12 @@
|
||||
// If $outer is true, the focus ring extends outward. Otherwise, it extends inward.
|
||||
// If $within is true, use focus-within instead of focus:focus-visible
|
||||
//
|
||||
@mixin focus-ring($target: null, $width: 2px, $offset: -$width, $outer: false, $within: false, $fc: $focus_border_color) {
|
||||
@mixin focus-ring($target: null, $width: 2px, $offset: -$width, $outer: false, $focus-state: 'focus:focus-visible', $fc: $focus_border_color) {
|
||||
& #{$target} {
|
||||
outline: 0 solid transparent;
|
||||
outline-offset: if($outer, $offset + 4px, $offset + $width + 4px);
|
||||
}
|
||||
|
||||
$focus-state: if($within, "focus-within", "focus:focus-visible");
|
||||
|
||||
&:#{$focus-state} #{$target} {
|
||||
outline-color: $fc;
|
||||
outline-width: $width;
|
||||
|
Loading…
Reference in New Issue
Block a user