# basscss-responsive-states

> Responsive state utilities module for Basscss

Latest version **1.0.6** (published 2016-02-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install basscss-responsive-states
pnpm add basscss-responsive-states
yarn add basscss-responsive-states
bun add basscss-responsive-states
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2016-02-01 |
| First published | 2015-04-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5898 |
| Author | Brent Jackson |
| Maintainers | jxnblk |

## Links

- npm: https://www.npmjs.com/package/basscss-responsive-states
- Repository: https://github.com/basscss/basscss
- Issues: https://github.com/basscss/basscss/issues
- npm.io page: https://npm.io/package/basscss-responsive-states

## Dependencies (1)

- [basscss-defaults](https://npm.io/package/basscss-defaults.md) ^2.0.1

## Recent versions

- 1.0.6 (latest) — 2016-02-01
- 1.0.5 — 2016-02-01
- 1.0.4 — 2015-12-17
- 1.0.3 — 2015-06-26
- 1.0.2 — 2015-06-26
- 1.0.1 — 2015-04-11
- 1.0.0 — 2015-04-11

## README

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.

<div class="overflow-auto">
  <table class="mb2 table-flush table-light">
    <thead>
      <tr> <th>Prefix</th> <th>Description</th> </tr>
    </thead>
    <tbody>
      <tr> <td>(no prefix)</td> <td>Not scoped to a breakpoint</td> </tr>
      <tr> <td>sm-</td> <td>--breakpoint-sm (default: min-width 40em)</td> </tr>
      <tr> <td>md-</td> <td>--breakpoint-md (default: min-width 52em)</td> </tr>
      <tr> <td>lg-</td> <td>--breakpoint-lg (default: min-width 64em)</td> </tr>
    </tbody>
  </table>
</div>

Adjust the custom media queries to suite your needs.


## Show and hide content
Resize the browser window to see the effect.

```html
<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.

```html
<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.

```html
<form>
  <label for="search" class="hide">Search</label>
  <input id="search" type="search" class="field">
  <button class="btn btn-primary">Go</button>
</form>
```

---
_Source: https://npm.io/package/basscss-responsive-states · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
