forked from AuroraMiddleware/gtk
Adwaita: don't focus outline tabs with mouse
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2721
This commit is contained in:
parent
38f09ac38e
commit
dd61c248c1
@ -292,7 +292,7 @@ entry {
|
|||||||
|
|
||||||
@include entry(normal);
|
@include entry(normal);
|
||||||
|
|
||||||
@include focus-ring($within: true);
|
@include focus-ring($focus-state: 'focus-within');
|
||||||
|
|
||||||
> image { // icons inside the entry
|
> image { // icons inside the entry
|
||||||
&.left { margin-right: 6px; }
|
&.left { margin-right: 6px; }
|
||||||
@ -342,7 +342,7 @@ entry {
|
|||||||
&.#{$e_type} {
|
&.#{$e_type} {
|
||||||
color: $e_color;
|
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); }
|
&:focus-within { @include entry(focus, $e_color); }
|
||||||
|
|
||||||
@ -1881,7 +1881,7 @@ popover.background {
|
|||||||
* Notebooks *
|
* Notebooks *
|
||||||
*************/
|
*************/
|
||||||
notebook {
|
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 {
|
> header {
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
|
@ -9,14 +9,12 @@
|
|||||||
// If $outer is true, the focus ring extends outward. Otherwise, it extends inward.
|
// 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
|
// 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} {
|
& #{$target} {
|
||||||
outline: 0 solid transparent;
|
outline: 0 solid transparent;
|
||||||
outline-offset: if($outer, $offset + 4px, $offset + $width + 4px);
|
outline-offset: if($outer, $offset + 4px, $offset + $width + 4px);
|
||||||
}
|
}
|
||||||
|
|
||||||
$focus-state: if($within, "focus-within", "focus:focus-visible");
|
|
||||||
|
|
||||||
&:#{$focus-state} #{$target} {
|
&:#{$focus-state} #{$target} {
|
||||||
outline-color: $fc;
|
outline-color: $fc;
|
||||||
outline-width: $width;
|
outline-width: $width;
|
||||||
|
Loading…
Reference in New Issue
Block a user