docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
Build a Sass utility that generates responsive helper classes and custom grid styles for a web application.
Your task is to create a Sass stylesheet that:
Custom Breakpoint Classes: Generate utility classes that apply styles based on responsive breakpoints (desktop, tablet, phone). Each class should show/hide content or apply specific styling at different screen sizes.
Fixed-Width Grid Variant: Create a custom grid component with fixed column widths (instead of fluid percentage-based widths) that adapts across different device sizes. The grid should use 80px columns on desktop, 60px on tablet, and 50px on phone, with appropriate margins and gutters.
Breakpoint Utilities: Provide a way to access the minimum and maximum viewport widths for each device category programmatically in your Sass code.
The implementation should follow responsive design best practices and work seamlessly with existing Material Design grid systems.
// Generate responsive utility classes
.show-on-desktop { /* visible only on desktop */ }
.show-on-tablet { /* visible only on tablet */ }
.show-on-phone { /* visible only on phone */ }
.hide-on-desktop { /* hidden on desktop */ }
.hide-on-tablet { /* hidden on tablet */ }
.hide-on-phone { /* hidden on phone */ }
// Custom fixed-width grid component
.custom-grid { /* fixed-width grid for desktop */ }
.custom-grid--tablet { /* fixed-width grid for tablet */ }
.custom-grid--phone { /* fixed-width grid for phone */ }.show-on-desktop class makes content visible only when viewport width is 840px or greater @test.hide-on-tablet class hides content when viewport width is between 600px and 839px @test.custom-grid class creates a fixed-width layout with 80px columns for desktop viewports @testProvides responsive grid system with advanced Sass mixins and breakpoint utilities.