Expand description
Responsive design system and mobile styling utilities.
Centralizes the mobile/responsive CSS shared across pages so behavior stays consistent across device sizes: the base utilities and the mobile tab bar.
§Breakpoint Strategy
Mobile-first approach with these breakpoints:
- 768px: Tablets (primary mobile breakpoint,
--breakpoint-mobile) - 1024px: Small laptops (
--breakpoint-tablet)
§Touch Target Standards
Follows WCAG 2.5 guidelines:
- Minimum: 44x44px
- Comfortable: 48x48px
- Large (primary actions): 56x56px
§Usage
Include the styles in the page component:
use logicaffeine_web::ui::responsive::{MOBILE_BASE_STYLES, MOBILE_TAB_BAR_STYLES};
rsx! {
style { "{MOBILE_BASE_STYLES}" }
style { "{MOBILE_TAB_BAR_STYLES}" }
}§CSS Classes
| Class | Description |
|---|---|
.desktop-only | Hidden on mobile (≤768px) |
.mobile-only | Hidden on desktop (>768px) |
.touch-target | Minimum 44x44px touch area |
.safe-top | Respects notch/status bar |
.safe-bottom | Respects home indicator |
.scroll-smooth | iOS momentum scrolling |
Modules§
- breakpoints
- The widths and heights the layout changes at, in CSS pixels.
- media
- The media queries the Studio’s stylesheets and these shared ones use, by name. A stylesheet cannot
read a custom property inside
@media, so each query is written out in the CSS, and the one-Studio lock holds every@mediathe Studio draws from to one ofmedia::ALL. The app’s ownmatchMediachecks use the same strings. - touch
- Touch targets, in CSS pixels (WCAG 2.5.5).
Constants§
- MOBILE_
BASE_ STYLES - Include this in your root component (app.rs) for global mobile utilities
- MOBILE_
TAB_ BAR_ STYLES - Reusable mobile tab bar styles - use for any tabbed interface on mobile