Giter Club home page Giter Club logo

silc-core's Introduction

silc core Build Status npm version

The core module contains a number of SASS variables/mixins/functions, and a JavaScript class for the silc framework.

SASS functions

em

Converts a pixel value into its em equivalent. Accepts a second "context" parameter, which is the context value to base the calculation on. The context parameter defaults to the value of @silc-core--font-size, which by default is 16px.

em(16); // Returns 1em
em(16, 32); // Return 2em

rem

Converts a pixel value into its rem equivalent. The context for rem calculations is the root (html) element font size, which defaults to the value of @silc-core--font-size.

rem(25); // Returns 1.5rem

strip-unit

Strips units from a passed in string.

strip-unit(16px); // Returns 16

SASS mixins

media

Creates a media query based on a passed in breakpoint name, defined in $silc-core--breakpoints.

@include media('large') {
    font-size: rem(20);
}

SASS variables

A number of SASS variables are available to override. One particular variable to pay attention to is the $silc-core--breakpoints variable. The breakpoints variable allows you to create your own named breakpoints, which will then be used when using other silc modules like silc-grid.

JavaScript class

The SilcCore class adds a js class to the body element, which can then be used to progressively enhance your styles.

silc-core's People

Contributors

nickrigby avatar

Watchers

 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.