feat: add button press feedback
This commit is contained in:
@@ -95,6 +95,33 @@
|
||||
@apply border-border outline-ring/50;
|
||||
}
|
||||
|
||||
/* A click should read as a physical state change, not only as a hover ending.
|
||||
Keep the response short and compositor-friendly so repeated actions stay fast. */
|
||||
button:not(:disabled) {
|
||||
transform-origin: center;
|
||||
transition-property: color, background-color, border-color, box-shadow, filter, transform;
|
||||
transition-duration: 140ms;
|
||||
transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
|
||||
}
|
||||
|
||||
button:not(:disabled):active {
|
||||
transform: scale(0.97);
|
||||
filter: brightness(0.94);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
button:not(:disabled) {
|
||||
transition-duration: 0.01ms;
|
||||
}
|
||||
|
||||
button:not(:disabled):active {
|
||||
transform: none;
|
||||
filter: brightness(0.9);
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
html {
|
||||
@apply font-sans;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user