You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document defines the responsive design strategy for the Open EV Data UI. Visual tokens referenced here are defined in DESIGN_SYSTEM.md. Component-level specs are in UI_COMPONENTS.md.
Mobile-first CSS: base styles target mobile; larger viewports layer on via min-width media queries
Content-driven breakpoints: standard breakpoints with component-specific overrides when content demands it
Progressive enhancement: mobile gets a fully functional core experience; desktop gets enhanced visualizations
Avoid hiding information: content is reorganized, never removed — optional fields that don't exist in the data are simply not rendered (see Data-Driven Rendering)
Touch-native on mobile: larger touch targets, bottom navigation bar
Breakpoints
Defined in src/shared/styles/breakpoints.css:
Token
Value
Name
Typical Devices
--bp-sm
640px
Small
Large phones, landscape
--bp-md
768px
Medium
Tablets portrait
--bp-lg
1024px
Large
Tablets landscape, small laptops
--bp-xl
1280px
Extra large
Standard desktops
--bp-2xl
1440px
Wide
Wide monitors
Important
CSS custom properties cannot be used in media queries. Use the raw pixel values in @media declarations. The breakpoints.css file serves as documentation.
Media Query Pattern (Mobile-First)
/* Mobile first — base styles are mobile */@media (min-width:640px) { /* sm */ }
@media (min-width:768px) { /* md */ }
@media (min-width:1024px) { /* lg */ }
@media (min-width:1280px) { /* xl */ }
@media (min-width:1440px) { /* 2xl */ }