GithubHelp home page GithubHelp logo

snack-ui / snack-helper Goto Github PK

View Code? Open in Web Editor NEW
53.0 5.0 15.0 545 KB

๐Ÿ—ƒ A universal CSS helper library.

Home Page: https://snack-ui.github.io/snack-helper/

License: MIT License

JavaScript 2.45% SCSS 97.55%
css-helpers snack-helper css-variables sass css-utilities scss

snack-helper's Introduction

Snack-helper

npm license Gitter

Snack-helper is a universal CSS helper library.

Installation

$ npm install snack-helper --save

Usage

@use 'snack-helper';

The @use-based Sass API is only available in the version 2.2.0 or above.

Customization

Some helpers can be customized with variables. Take the spacing for example.

Here is the default spacing variable.

$spacer: 1rem !default;
$spacers: (
  0: 0,
  4: $spacer * .25,
  8: $spacer * .5,
  12: $spacer * .75,
  16: $spacer,
  24: $spacer * 1.5,
  32: $spacer * 2,
  48: $spacer * 3
) !default;

You can cover the whole original spacing with $spacers as you like.

@use 'snack-helper' with (
  $spacers: (
    0: 0,
    1: .25rem,
    2: .5rem,
    3: .75rem,
    4: 1rem,
    5: 1.5rem
  )
);

If you just want to extend the original spacing, you can use the $spacers-extend;

@use 'snack-helper' with (
  $spacers-extend: (
    5: 5px,
    10: 10px,
    15: 15px
  )
);

Overview

License

MIT License

snack-helper's People

Contributors

dependabot[bot] avatar nzbin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.