mirror of
https://github.com/picocss/pico.git
synced 2025-04-26 19:26:14 -04:00
Add a loading indicator for aria-busy
This commit is contained in:
parent
0e7894c48e
commit
dc42ec62f3
25 changed files with 517 additions and 301 deletions
|
@ -1,51 +0,0 @@
|
|||
/**
|
||||
* Accessibility & User interaction
|
||||
*/
|
||||
|
||||
|
||||
// Based on :
|
||||
// - normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css
|
||||
// - sanitize.css v12.0.1 | CC0 1.0 Universal | github.com/csstools/sanitize.css
|
||||
// ––––––––––––––––––––
|
||||
|
||||
// Accessibility
|
||||
|
||||
// Change the cursor on busy elements in all browsers (opinionated)
|
||||
[aria-busy="true"] {
|
||||
cursor: progress;
|
||||
}
|
||||
|
||||
// Change the cursor on control elements in all browsers (opinionated)
|
||||
[aria-controls] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
// Change the cursor on disabled, not-editable, or otherwise inoperable elements in all browsers (opinionated)
|
||||
[aria-disabled="true"],
|
||||
[disabled] {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
// Change the display on visually hidden accessible elements in all browsers (opinionated)
|
||||
[aria-hidden="false"][hidden] {
|
||||
display: initial;
|
||||
}
|
||||
|
||||
[aria-hidden="false"][hidden]:not(:focus) {
|
||||
clip: rect(0, 0, 0, 0);
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
// User interaction
|
||||
// Remove the tapping delay in IE 10
|
||||
a,
|
||||
area,
|
||||
button,
|
||||
input,
|
||||
label,
|
||||
select,
|
||||
summary,
|
||||
textarea,
|
||||
[tabindex] {
|
||||
-ms-touch-action: manipulation;
|
||||
}
|
|
@ -9,10 +9,10 @@
|
|||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
display: inline-block;
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
margin-top: -.125rem;
|
||||
margin-right: .375rem;
|
||||
width: 1.25em;
|
||||
height: 1.25em;
|
||||
margin-top: -.125em;
|
||||
margin-right: .375em;
|
||||
border-width: var(--border-width);
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
|
@ -29,12 +29,12 @@
|
|||
background-image: var(--icon-checkbox);
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: .75rem auto;
|
||||
background-size: .75em auto;
|
||||
}
|
||||
|
||||
& ~ label {
|
||||
display: inline-block;
|
||||
margin-right: .375rem;
|
||||
margin-right: .375em;
|
||||
margin-bottom: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@
|
|||
background-image: var(--icon-minus);
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: .75rem auto;
|
||||
background-size: .75em auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@
|
|||
&:checked:active,
|
||||
&:checked:focus{
|
||||
--background-color: var(--primary-inverse);
|
||||
border-width: .35rem;
|
||||
border-width: .35em;
|
||||
background-image: none;
|
||||
}
|
||||
}
|
||||
|
@ -72,8 +72,8 @@
|
|||
--color: var(--switch-color);
|
||||
|
||||
// Config
|
||||
$switch-height: 1.25rem;
|
||||
$switch-width: 2.25rem;
|
||||
$switch-height: 1.25em;
|
||||
$switch-width: 2.25em;
|
||||
$switch-transition: .1s ease-in-out;
|
||||
|
||||
// Styles
|
||||
|
|
|
@ -220,7 +220,7 @@ textarea {
|
|||
&[disabled] {
|
||||
--background-color: var(--form-element-disabled-background-color);
|
||||
--border-color: var(--form-element-disabled-border-color);
|
||||
opacity: .375;
|
||||
opacity: var(--form-element-disabled-opacity);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
@if $enable-transitions and $enable-important {
|
||||
|
||||
/**
|
||||
* Reduce Motion Features
|
||||
*/
|
||||
|
||||
|
||||
// Based on :
|
||||
// - sanitize.css v12.0.1 | CC0 1.0 Universal | github.com/csstools/sanitize.css
|
||||
// ––––––––––––––––––––
|
||||
|
||||
// 1. Remove animations when motion is reduced (opinionated)
|
||||
// 2. Remove fixed background attachments when motion is reduced (opinionated)
|
||||
// 3. Remove timed scrolling behaviors when motion is reduced (opinionated)
|
||||
// 4. Remove transitions when motion is reduced (opinionated)
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*,
|
||||
::before,
|
||||
::after {
|
||||
background-attachment: initial !important; // 2
|
||||
animation-duration: 1ms !important; // 1
|
||||
animation-delay: -1ms !important; // 1
|
||||
animation-iteration-count: 1 !important; // 1
|
||||
scroll-behavior: auto !important; // 3
|
||||
transition-delay: 0s !important; // 4
|
||||
transition-duration: 0s !important; // 4
|
||||
}
|
||||
}
|
||||
}
|
|
@ -18,15 +18,15 @@ strong {
|
|||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: .75rem;
|
||||
font-size: .75em;
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
sub {
|
||||
bottom: -0.25rem;
|
||||
bottom: -0.25em;
|
||||
}
|
||||
sup {
|
||||
top: -0.5rem;
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
// Remove the margin on nested lists in Chrome, Edge, IE, and Safari
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue