basscss-utility-responsive-states

Responsive state utilities module for Basscss

This package has been renamed basscss-responsive-states
Last updated 12 years ago by jxnblk .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install basscss-utility-responsive-states 
SYNC missed versions from official npm registry.

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.

<h3 class="sm-show">Visible from <code>--breakpoint-sm</code> and up.</h3>
<h3 class="sm-hide red">Hidden from <code>--breakpoint-sm</code> and up.</h3>

Responsive Line Break

Control wrapping at different screen widths.

<h1>
  Responsive Line Break
  <br class="md-show">
  To Control Wrapping
</h1>

Accessible Hide

To visually hide things like form labels in an accessible way, use the .hide utility.

<form>
  <label for="search" class="hide">Search</label>
  <input id="search" type="search" class="field-light">
  <button class="button">Go</button>
</form>

Current Tags

  • 0.0.5                                ...           latest (12 years ago)

5 Versions

  • 0.0.5 [deprecated]           ...           12 years ago
  • 0.0.4                                ...           12 years ago
  • 0.0.3                                ...           12 years ago
  • 0.0.2                                ...           12 years ago
  • 0.0.1                                ...           12 years ago
Maintainers (1)
Downloads
Total 14
Today 0
This Week 0
This Month 7
Last Day 0
Last Week 4
Last Month 3
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE