Skip to content

Commit

Permalink
fix(interface): ♿ make segmented controls tabbable
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNZL committed Jul 16, 2022
1 parent 6d05f9c commit a7129e8
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/style/stylesheet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,9 @@ select {
color: var(--text-colour);

&>input {
display: none;
opacity: 0;
position: absolute;
z-index: -10;

&:checked+label {
color: configuration.$accent-complement;
Expand All @@ -438,10 +440,18 @@ select {
font-weight: 700;
}

&:focus {
&~label:last-of-type::before {
box-shadow: 0 0 0 0.2rem var(--element-shadow);
background-color: var(--element-hover);
}
}

&:nth-of-type(1) {

&:checked,
&:active {
&:active,
&:focus {
&~label:last-of-type::before {
transform: translateX(calc(-1 * configuration.$border-width));
}
Expand All @@ -451,7 +461,8 @@ select {
&:nth-of-type(2) {

&:checked,
&:active {
&:active,
&:focus {
&~label:last-of-type::before {
transform: translateX(calc(100% - 3 * configuration.$border-width));
}
Expand Down Expand Up @@ -499,7 +510,8 @@ select {
&:nth-of-type(3) {

&:checked,
&:active {
&:active,
&:focus {
&~label:last-of-type::before {
transform: translateX(calc(200% - 5 * configuration.$border-width));
}
Expand Down

0 comments on commit a7129e8

Please sign in to comment.