mirror of
https://koodu.h-i.works/projects/thebadspace
synced 2025-05-06 14:41:02 -05:00
adds a focus indicator that passes the accessibility requirements WCAG 2.2: §1.4.11 & §2.4.7
59 lines
1.1 KiB
CSS
59 lines
1.1 KiB
CSS
input[type="email"],
|
|
input[type="password"],
|
|
input[type="text"] {
|
|
border: 0;
|
|
padding: 5px;
|
|
border-radius: 5px;
|
|
font: 18px var(--base-type);
|
|
display: inline-block;
|
|
background: var(--white);
|
|
color: var(--primary);
|
|
transition: all 0.2s linear;
|
|
height: 30px;
|
|
}
|
|
|
|
input[type="text"]:focus,
|
|
input[type="password"]:focus {
|
|
background-color: var(--highlight);
|
|
}
|
|
|
|
/* TODO: generalise this a bit */
|
|
button:focus,
|
|
input[type="submit"]:focus,
|
|
input[type="text"]:focus,
|
|
input[type="password"]:focus {
|
|
outline: 2px solid var(--white);
|
|
outline-offset: -4px;
|
|
}
|
|
|
|
textarea {
|
|
border: 0;
|
|
border-radius: 3px;
|
|
color: var(--primary);
|
|
background: var(--white);
|
|
}
|
|
|
|
button,
|
|
input[type="submit"] {
|
|
background: var(--highlight);
|
|
color: var(--white);
|
|
font: 20px var(--base-type);
|
|
border-radius: 5px;
|
|
position: relative;
|
|
cursor: pointer;
|
|
border: 0;
|
|
transition: all 0.3s linear;
|
|
height: 35px;
|
|
margin-top: 15px;
|
|
}
|
|
|
|
select {
|
|
font: 20px var(--base-type);
|
|
border-radius: 5px;
|
|
border: 1px solid var(--primary);
|
|
appearance: none;
|
|
color: var(--primary);
|
|
background: var(--secondary);
|
|
height: 35px;
|
|
}
|