Initial Frost v0.1 framework
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
@layer frost.accessibility {
|
||||
:where(:focus-visible) {
|
||||
outline: var(--frost-focus-width) solid var(--frost-focus-color);
|
||||
outline-offset: var(--frost-focus-offset);
|
||||
}
|
||||
|
||||
.frost-visually-hidden:not(:focus):not(:active) {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0 0 0 0);
|
||||
clip-path: inset(50%);
|
||||
white-space: nowrap;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.frost-skip-link {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 1rem;
|
||||
z-index: 100;
|
||||
padding: var(--frost-space-2) var(--frost-space-3);
|
||||
transform: translateY(-150%);
|
||||
background: var(--frost-color-surface);
|
||||
color: var(--frost-color-text);
|
||||
border: 1px solid var(--frost-color-border-strong);
|
||||
border-radius: var(--frost-radius-sm);
|
||||
transition: transform var(--frost-duration-fast) var(--frost-ease-out);
|
||||
}
|
||||
|
||||
.frost-skip-link:focus { transform: translateY(1rem); }
|
||||
.frost-hidden { display: none; }
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
:where(html) { scroll-behavior: auto; }
|
||||
:where(*, *::before, *::after) {
|
||||
animation-duration: 1ms !important;
|
||||
animation-iteration-count: 1 !important;
|
||||
scroll-behavior: auto !important;
|
||||
transition-duration: 1ms !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user