ourostack

mobile-web

Use when building or reviewing Ouro HX for web components or apps for touch, small screens, safe areas, mobile keyboards, and scrolling.

ourostack 1 1 Updated 21h ago
GitHub

Install

npx skillscat add ourostack/ouro-ui/mobile-web

Install via the SkillsCat registry.

SKILL.md

Mobile web craft

Make the person's task work with a finger, keyboard, mouse and assistive technology; do not infer input capability from screen width or a user agent. Start with the app's actual viewport and scrolling surfaces, then test the states a person reaches, including open overlays and editing.

  • Viewport and safe areas: Use dvh for a shell that follows the visible viewport and svh when a stable first screen is wanted. For edge-to-edge apps, set viewport-fit=cover and pad fixed controls and overlay content with the appropriate env(safe-area-inset-*, 0px) values, including landscape sides. Check with the keyboard open. Do not disable browser zoom.
  • Touch: Give controls a 44px hit area on coarse pointers without covering a neighbour.[^target] Use Ouro's TouchTarget and existing press treatment where applicable; keep focus and reduced-motion behavior intact. Gate hover decoration with both hover and fine-pointer capabilities (pointer-fine:hover: in Tailwind). Do not rely on hover for a necessary action.
  • Tap feedback: If removing a browser tap highlight, provide visible press and keyboard-focus feedback instead. Keep text content selectable and preserve link callouts where people need them.
  • Scroll and momentum: Prefer native overflow scrolling and scroll snap to a custom gesture. Contain overscroll on an inner surface only when chaining into the background is unwanted; do not suppress pull-to-refresh on every document by default.[^scroll] Give custom gestures only the axes they own, leaving page scrolling and pinch zoom available. Check a flick through its full deceleration and after content loads.
  • Text entry: Keep editable text at least 16 CSS pixels on coarse pointers, including compact variants and landscape.[^entry] Set input type, input mode and return-key hint for the task; never prevent zoom as a workaround.

Prove the change

Run the touched component's tests in the relevant browser projects. The repository's scripts/source-rules.test.mjs checks Tailwind hover variants in registry runtime sources and hover selectors in shipped theme CSS; test/text-size.touch.test.tsx measures visible text-entry controls in stories and docs demos in portrait and landscape. Neither check covers every app state or every stylesheet.[^hover][^text]

Run Ouro check on the built app and exercise the real task on iOS Safari and Android Chrome when devices are available. Review safe areas, software keyboard, zoom, tap highlight, target overlap, overscroll and momentum on hardware; emulation and computed CSS alone do not establish how those interactions feel. If hardware is unavailable, say what was and was not verified.

The mobile-web ideas were adapted from the mobile-native reference; use Ouro's own component conventions and the Ouro Feel standard when applying them.

[^hover]: scripts/source-rules.test.mjs verify:testExists(scripts/source-rules.test.mjs::every hover style is gated on a fine pointer (pointer-fine:hover:), so a tap on a phone leaves no hover state behind) verify:testExists(scripts/source-rules.test.mjs::shipped theme styles gate hover on hover and fine pointer)
[^text]: test/text-size.touch.test.tsx verify:fileLine(test/text-size.touch.test.tsx, /every story and every docs demo/)
[^target]: registry/ouro/lib/ouro/touch-target.tsx verify:fileLine(registry/ouro/lib/ouro/touch-target.tsx, /size-[max(100%,44px)]/)
[^entry]: test/text-size.touch.test.tsx verify:fileLine(test/text-size.touch.test.tsx, /parseFloat(size) < 16/)
[^scroll]: registry/ouro/components/ouro/sheet/sheet-parts.tsx verify:fileLine(registry/ouro/components/ouro/sheet/sheet-parts.tsx, /overflow-y-auto overscroll-contain/)