Skip to content

fix(demo): make demo pages responsive and mobile friendly - #130

Merged
treeder merged 1 commit into
mainfrom
mobile_friendly_demo
Sep 16, 2026
Merged

treeder merged 1 commit into
mainfrom
mobile_friendly_demo

Conversation

@treeder

@treeder treeder commented Sep 16, 2026

Copy link
Copy Markdown
Member

Description

Fixes layout overflow and elements getting clipped on mobile devices across the demo pages.

Key Changes

  • Layout & Container Constraints: Added .layout-container (width: 100%; min-width: 0;), .content-container (flex: 1; min-width: 0; width: 100%;), and constrained md-carousel (max-width: 100%; min-width: 0;) so flex items properly shrink on mobile viewports.
  • Universal Box Sizing: Added box-sizing: border-box to prevent container padding from overflowing the 100% viewport width.
  • Search Alignment: Wrapped <md-search> in .search-container with 1rem horizontal padding and max-width 1200px to align with .main content.
  • Text & Link Wrapping: Added overflow-wrap: break-word to ensure long URLs wrap properly on narrow screens.
  • Component Wrapping: Enabled .flexw (flex-wrap: wrap) on the switch/checkbox/radio/snack/dialog controls and icon button cluster in expressive-component.js.
  • Card Responsiveness: Added max-width: 100% to md-card.
  • Mobile Snackbar Offset: Added --md-snackbar-bottom CSS variable support to md-snackbar, positioning it at 96px on compact screens (< 600px) to clear the bottom navigation bar.
  • Picker Demos Padding: Added responsive padding (16px 12px on < 600px) to date-picker-demo.html and time-picker-demo.html so 328px pickers fit on 360px–375px mobile viewports without horizontal scrollbars.

Verification

Verified on headless Chromium across mobile (320px, 360px, 375px, 412px), tablet (768px), and desktop (1200px) viewports with zero horizontal scrolling.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review Summary

This pull request improves responsive styling across the demo application, fixing layout overflow and viewport clipping on mobile viewports. Key enhancements include flex-wrapping controls in the expressive demo component, setting box-sizing and overflow safeguards, providing responsive snackbar positioning to prevent overlap with the bottom navigation bar on mobile, and adding viewport media queries for date and time picker demo pages.

🔍 General Feedback

  • The responsive styling improvements significantly enhance the demo experience on small screens and mobile viewports.
  • Introducing --md-snackbar-bottom: 96px; on narrow viewports cleanly prevents the snackbar from occluding or overlapping with <md-nav-bar>.
📊 Token Usage & Cost Efficiency
Metric Value
Input Tokens (uncached) 26,030
Input Tokens (cached) 346,224 (⚡ 93.0% cached)
Thinking / Reasoning Tokens 53
Output Tokens 166
Total Session Tokens 372,473
Cost (uncached input) $0.0195
Cost (cached input) $0.0260
Cost (thinking / reasoning) $0.0002
Cost (response output) $0.0006
Estimated Total Cost $0.0463

Gemini 3.8 Flash: introductory rate $0.75/$3.75 per 1M applied; reverts to $1.5/$7.5 after 2026-12-31.
Gemini 3.8 Flash: standard tier; batch and flex are half again, priority is higher.
Cache reads are priced here, but context-cache STORAGE, where the model charges for it separately per token-hour, is not included, so the figure can run slightly low.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
material 5eec742 Commit Preview URL

Branch Preview URL
Sep 16 2026, 08:19 PM

@treeder
treeder merged commit db2cef7 into main Sep 16, 2026
2 checks passed
@treeder
treeder deleted the mobile_friendly_demo branch September 16, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant