All components must work on viewports from 320px up. Apply these rules in every component.
Cap with min(Xpx, calc(100vw - 2rem)) or add max-width:calc(100vw - 1rem) on positioned panels (menus, popovers, dropdowns, modals).
100dvh, never 100vhMobile browsers have dynamic toolbars that change the viewport height; dvh accounts for this.
100%, never 100vw100vw includes scrollbar width and causes horizontal overflow on full-width elements.
pointermove, pointerdown, pointerup, pointerenter, pointerleave — these fire on both mouse and touch. Never use mousemove, mousedown, mouseenter, etc.
Add @media (pointer:coarse) rules to enlarge interactive elements (thumbs, buttons) that are smaller than 44px at their default size.
Link demo-responsive.css for shared responsive breakpoints and theme. Use var(--page-bg), var(--surface-bg), etc. — do not hardcode theme colours in demo HTML.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |