@seedcss/seed-thumbnail

1.0.1 • Public • Published

seed-thumbnail

npm version

Thumbnail component pack for Seed

Install

npm install @seedcss/seed-thumbnail --save

Documentation

Check out our documentation of this pack.

Basic Usage

SCSS

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

const gulp = require("gulp");
const sass = require("gulp-sass");
const pathfinder = require("sass-pathfinder");
const pack = require("@seedcss/seed-thumbnail");

gulp.task("sass", function() {
  return gulp
    .src("./sass/**/*.scss")
    .pipe(
      sass({
        includePaths: pathfinder(
          // Other includePaths...
          pack
        )
      })
    )
    .pipe(gulp.dest("./css"));
});

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

// Packs
@import "pack/seed-thumbnail/_index";

Options

The following variables can be found in _config.scss

// Thumbnail :: Config

// Namespaces
$seed-thumbnail-namespace: "c-thumbnail" !default;
$seed-thumbnail-image-namespace: "#{$seed-thumbnail-namespace}__image" !default;

// Config
// Borders
$seed-thumbnail-border-radius: 0 !default;
$seed-thumbnail-border-radius-rounded: 4px !default;

// Colors
$seed-thumbnail-background-color: #eee !default;

// Size
$seed-thumbnail-ratio-w: 16 !default;
$seed-thumbnail-ratio-h: 9 !default;

// Alignment
$seed-thumbnail-alignments: (
  top: (
    top: 0,
    bottom: inherit
  ),
  center: (
    top: -100%,
    bottom: -100%,
  ),
  bottom: (
    top: inherit,
    bottom: 0
  )
) !default;

// Sizes
// Pass in ratios for w:h
$seed-thumbnail-sizes: (
  wide: (
    width: 16,
    height: 9
  ),
  sd: (
    width: 4,
    height: 3
  ),
  square: (
    width: 1,
    height: 1
  )
) !default;

Package Sidebar

Install

npm i @seedcss/seed-thumbnail

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

16.2 kB

Total Files

21

Last publish

Collaborators

  • helpscout
  • mecarter