STEP 1 · LEARN How it works A robust component does not rely on one state. Minimum size helps touch, hover gives pointer feedback, focus-visible supports keyboard navigation, and motion preference can disable the transition.
.action { min-height: 44px; transition: background-color 160ms ease; } .action:hover { background-color: #115e59; } .action:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; } @media (prefers-reduced-motion: reduce) { .action { transition: none; } }The same button provides feedback for touch, pointer and keyboard without imposing motion.
.action:hover { transform: scale(1.2); } .action:focus { outline: none; }Strong scaling can destabilise the interface, while removing focus blocks keyboard users.
EXPECTED RESULT The button is easy to tap, responds to pointer, remains keyboard-operable and respects motion preference.
STEP 2 · APPLY Your exercise Complete a 44px min-height, 160ms ease background transition, #115e59 hover, 3px focus with 3px offset and transition: none for reduced motion.
Code Result
index.html CSS
Exercise code
STEP 4 · CHECK
What needs to pass 0% not checked
○ The button has a minimum height of 44px. ○ Only the background is transitioned. ○ Hover uses #115e59. ○ Focus has the required outline. ○ Focus has a 3px offset. ○ Reduced motion removes the transition. ○ The target element is present in the page.
Check exercise✓ Show a hint
Explain the solution logic+ Each rule has one responsibility: size, pointer feedback, keyboard focus or motion adaptation.