Use these utilities to conditionally show and hide elements based on viewport width using a mobile-first approach.
Prefix Naming Convention
All breakpoint-based styles in Basscss follow the same naming convention.
Prefix | Description |
---|---|
(no prefix) | Not scoped to a breakpoint |
sm- | --breakpoint-sm (default: min-width 40em) |
md- | --breakpoint-md (default: min-width 52em) |
lg- | --breakpoint-lg (default: min-width 64em) |
Adjust the custom media queries to suite your needs.
Show and hide content
Resize the browser window to see the effect.
Visible from --breakpoint-sm and up.Hidden from --breakpoint-sm and up.
Responsive Line Break
Control wrapping at different screen widths.
Responsive Line Break To Control Wrapping
Accessible Hide
To visually hide things like form labels in an accessible way, use the .hide
utility.
Search Go