The Sanggar’s work sheet on the bamboo frame: write a selector, then hover, Tab and tick right on the page, and every element shows the states the browser…
Hover, a focus ring for keyboard users, zebra rows, form validation, "a card that has a picture": all of it with CSS alone, with no JavaScript adding and removing classes.
States can be selected too, and :has() looks inside
outline: none on :focus with no replacement Keyboard users lose track of where they are. If the default ring bothers mouse users, restyle it on :focus-visible instead of removing it.:hover and :focus on links (LVHA) a:link, a:visited, a:hover, a:active share one specificity (0,1,1), so the one written last wins. Write them L-V-H-A (LoVe HAte), or :link overrides :hover.:has() in older browsers Safe in every modern browser since 2023 (Firefox 121+). For older ones, detect it with @supports selector(:has(*)) and keep a look without that effect.a:hover, then point at a link on the sheet The mark comes and goes with the mouse; the code stays the same.li:has(:checked), then tick a task The row (the parent) gets marked when the box inside it is ticked.button:focus-visible, then Tab to Simpan Tab: it matches. A mouse click: it does not. See "State right now".:is(nav) a, then :where(nav) a The same elements match, the specificity differs: (0,0,2) against (0,0,1).