Focused style improvements

This commit is contained in:
James Lyne 2021-05-25 23:27:25 +01:00
parent 0690b3d500
commit 7250ffed05
4 changed files with 12 additions and 11 deletions

View File

@ -125,7 +125,7 @@
--background-hover: #cccccc; /* Button :hover/selected */ --background-hover: #cccccc; /* Button :hover/selected */
--background-active: #eeeeee; /* Button :active */ --background-active: #eeeeee; /* Button :active */
--outline-focus: #222222; /* Button :focus outline */ --outline-focus: #cccccc; /* Button :focus outline */
--border-radius: 1rem; --border-radius: 1rem;
--border-color: #333333; /* Control borders */ --border-color: #333333; /* Control borders */

View File

@ -37,10 +37,9 @@
} }
@include focus { @include focus {
outline-color: var(--outline-focus); outline: var(--outline-focus) auto thick !important;
outline-width: 0.2rem; background-color: var(--background-base);
background-color: var(--background-hover); color: var(--text-base);
color: var(--text-hover);
z-index: 1; z-index: 1;
} }

View File

@ -20,7 +20,7 @@
box-shadow: var(--box-shadow); box-shadow: var(--box-shadow);
margin: 0; margin: 0;
box-sizing: border-box; box-sizing: border-box;
overflow: hidden; overflow: visible;
font-size: 1.5rem; font-size: 1.5rem;
a, button { a, button {

View File

@ -60,7 +60,7 @@ a {
color: var(--text-base); color: var(--text-base);
} }
button { button, [type=button] {
@extend %button; @extend %button;
} }
@ -86,7 +86,7 @@ input {
} }
} }
.js-focus-visible :focus:not(.focus-visible) { .js-focus-visible :focus:not(.focus-visible):not(:focus-visible) {
outline: none; outline: none;
} }
@ -204,6 +204,7 @@ input {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
padding: 0.5rem 2rem; padding: 0.5rem 2rem;
overflow: hidden;
.clock__time { .clock__time {
text-align: center; text-align: center;
@ -365,9 +366,10 @@ input {
line-height: 1; line-height: 1;
/* Workaround for focus outlines until https://github.com/Leaflet/Leaflet/pull/7259 gets released */ /* Workaround for focus outlines until https://github.com/Leaflet/Leaflet/pull/7259 gets released */
@include focus { * {
outline: -webkit-focus-ring-color auto thin !important; @include focus {
outline: revert !important; outline-style: auto !important;
}
} }
} }