special handling for tabbox focus-ring (#4761)
Set focusring on the child hbox, instead of the actual tab. The hbox is the element with visibly rounded corners, so this way the focus-ring will have the right shape. Fixes: #4744
This commit is contained in:
parent
ae101f5393
commit
4c68f834c1
3 changed files with 20 additions and 8 deletions
|
@ -88,6 +88,16 @@ tabbox {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// focus-ring if tabbox is not marked as clicked (to avoid blinking)
|
||||
&:not([clicked]) tab:focus-visible {
|
||||
outline: none;
|
||||
// box-shadow should appear around hbox with rounded corners
|
||||
hbox {
|
||||
box-shadow: 0 0 0 var(--width-focus-border) -moz-mac-focusring !important;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
tabpanels {
|
||||
appearance: none;
|
||||
|
|
|
@ -213,9 +213,3 @@ browser,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// show focusring only during keyboard navigation
|
||||
#tabs:not([clicked]) tab:focus-visible {
|
||||
outline: none;
|
||||
box-shadow: 0 0 0 var(--width-focus-border) var(--color-focus-border);
|
||||
}
|
|
@ -35,8 +35,6 @@ tabbox {
|
|||
border-inline-end: 1px solid var(--fill-quinary);
|
||||
}
|
||||
|
||||
@include focus-ring;
|
||||
|
||||
.tab-middle {
|
||||
outline: none !important;
|
||||
padding: 4px 11px 5px 11px;
|
||||
|
@ -55,6 +53,16 @@ tabbox {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// focus-ring if tabbox is not marked as clicked (to avoid blinking)
|
||||
&:not([clicked]) tab:focus-visible {
|
||||
outline: none;
|
||||
// outline should appear around hbox with rounded corners
|
||||
hbox {
|
||||
outline: var(--color-focus-outer-border) solid var(--width-focus-outer-border) !important;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
tabpanels {
|
||||
appearance: none;
|
||||
|
|
Loading…
Add table
Reference in a new issue