Naughty Program Manipulator
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

seed-visibility

0.2.4 • Public • Published

seed-visibility Build Status npm version Dependency Status

Visibility utility pack for Seed!

Install

npm install seed-visibility --save

Documentation

Check out our styleguide for documentation of this pack.

Visibility handling with display

For the display: none / display: block based visibility techniques, check out seed-display.

Basic Usage

CSS

Add the seed-visibility.css or seed-visibility.min.css to your project, and import it like so:

<link rel="stylesheet" href="/css/seed-visibility.css">

SCSS

This seed pack needs to be imported into your sass pipeline. Below is an example using Gulp:

var gulp = require('gulp');
var sass = require('gulp-sass');
var seedTypography = require('seed-visibility');
 
gulp.task('sass', function () {
  return gulp.src('./sass/**/*.scss')
    .pipe(sass({
      includePaths: seedTypography
    }))
    .pipe(gulp.dest('./css'));
});

Once that is setup, simply @import seed-visibility as needed in your .scss file:

// Packs 
@import "pack/seed-visibility";

Note: Because seed-visibility has dependencies, its includePaths output will be an array. If you're including other paths in addition to seed-visibility, you will need to flatten the array. An easy way to do this is to use sass-pathfinder.

Example with sass-pathfinder:

var gulp = require('gulp');
var sass = require('gulp-sass');
var seedTypography = require('seed-visibility');
var pathfinder = require('sass-pathfinder');
 
gulp.task('sass', function () {
  return gulp.src('./sass/**/*.scss')
    .pipe(sass({
      includePaths: pathfinder(
        './scss/vendor/example',
        './scss/plugins/super-awesome-plugin',
        seedTypography
      )
    }))
    .pipe(gulp.dest('./css'));
});

Options

The following variables can be found in _config.scss

$seed-visibility-invisible-namespace: u-invisible !default;
$seed-visibility-screen-reader-namespace: u-sr-only !default;
$seed-visibility-visible-namespace: u-visible !default;

Install

npm i seed-visibility

DownloadsWeekly Downloads

58

Version

0.2.4

License

MIT

Last publish

Collaborators

  • avatar