RTS questionnaire · Q23 · Responsive-strategy proof

How have you handled responsive design and differences in UI behavior across different viewports?

A runnable review of the approach: three concerns kept apart — layout adaptation, behavioural adaptation and per-viewport performance — and the device matrix that verifies them.

Status: reviewed Live strategy workflow Mobile-first · Container queries · a11y Jump to live proof ↓

23. Responsive approach and cross-viewport behaviour

Answer as submitted

“My approach separates three concerns: layout adaptation, behavioural adaptation and performance per viewport.”
Technical decision: expand. The submitted line names the three concerns but not how each is implemented or where the boundary between them sits. This page is the separate, detailed version: it shows mobile-first layering, fluid before discrete breakpoints, container queries, the behaviour that must live in code rather than CSS, and the assets and accessibility work that goes with them.

Expanded answer

The approach separates three concerns so that a change in one does not fight the other two. Layout: mobile-first CSS with a named breakpoint scale, fluid grids and space tokens, container queries for anything reusable, and progressive enhancement so the smallest viewport receives the simplest correct structure. Behaviour: what CSS cannot express — navigation pattern, table versus card rendering, virtual scrolling and chart density — is driven by one observed viewport source (BreakpointObserver or matchMedia) exposed as a signal, so every component reads the same decision. Performance: responsive images with srcset/sizes, lazy loading below the fold, and per-viewport budgets for Core Web Vitals. Accessibility is verified at every breakpoint, not only on desktop: tap targets, focus order, 200% zoom and an accessibility tree that keeps its shape.

ConcernHow it is handledWhy it is done this way
Layoutmobile-first layers, named breakpoints, fluid tokensThe constrained case is the default, so it cannot be forgotten.
Fluidity vs stepsclamp() and flexible grids; discrete changes only when behaviour changesRemoves most breakpoints entirely and reduces override debt.
Reusable componentscontainer queriesA component adapts to its slot, so one card serves sidebar, modal and panel.
Behaviourone observed viewport signal (BreakpointObserver/matchMedia)Structural decisions are testable and identical across components.
Assetssrcset/sizes, art direction, lazy loadingMobile transports a fraction of the bytes without shrinking a desktop image.
Accessibility44 px targets, zoom to 200%, identical a11y tree at every breakpointA layout change must never remove access for someone.
Verificationdevice matrix in CI with vitals budgetsRegressions are caught by the pipeline, not by a customer.

Live responsive-strategy workflow proof

The running component below changes its decision/result view through real event binding. Select a step to see the approach, the reasoning behind it, and the measurement that shows it working.

LIVE PREVIEW
RUNNING
RWD STRATEGY WORKFLOWRUNNING

Choose a strategy step

Select a step to inspect the approach, the reasoning and the measured result.

$ @include from('tablet') { … } — the base layer is the smallest layout

The smallest layout is the default and complexity is added upwards, so the constrained case is the one that cannot be forgotten and fewer properties get overridden.

media-query overrides per component: 6 → 2
320 px renders fully with no media query at all

Where the line is drawn

Rules I apply. Write the smallest layout first; prefer continuous adaptation and reserve discrete breakpoints for behaviour changes; let reusable components adapt by container rather than by window; keep structural decisions in one observable viewport signal so they can be tested; serve the right asset size instead of scaling one down; verify accessibility at every breakpoint; and attach budgets so a responsive change cannot quietly cost performance.
Boundary for Q23: this page covers the responsive approach and cross-viewport behaviour. Design-system governance across teams, native mobile application design and A/B experimentation for layout variants are separate topics.

Source files

Select a file to inspect the proof with syntax highlighting and line numbers. The first file is the code running the component above; the other two are the production shapes of the same approach.

Acceptance criteria