Code Monkey home page Code Monkey logo

sass-helpers's Introduction

Lilium Framework

A group of mixins, functions and variables to get your frontend project started.

Getting Started

Installation

npm install starlette-sass-helpers

Usage

Include the following "import" in your sass files.

@import "path/to/your/node_modules/starlette-sass-helpers/scss/lilium";

Remember to change out "path/to/your/" to match your folder structure.

For example, if your sass file is located at "/assets/sass/layout.scss" then the code would change to this:

@import "../../node_modules/starlette-sass-helpers/scss/lilium";

Documentation

Breakpoints

body {
    @include breakpoint(sm) { 
        color: green;
    }
    @include breakpoint(sm, max) { 
        color: blue;
    }
    @include breakpoint(sm, between) {
        color: red;
    }
    @include breakpoint(lg, between) {
        color: black;
    }
}

The above code compiles to this

@media(min-width: 576px) {
    body {
        color: green;
    }
}
@media(max-width: 575px) {
    body {
        color: blue;
    }
}
@media(min-width: 576px)and (max-width: 767px) {
    body {
        color: red;
    }
}
@media(min-width: 992px)and (max-width: 1199px) {
    body {
        color: #000;
    }
}

Flexbox

See how flexbox works.

body {
    @include flexbox;
    @include flex-direction( col );
}

New Feature

Fluid (Responsive) Typography

Mixin Param 1 Param 2
font-size Mobile font size Desktop font size

As the screen size changes the font size will change accordingly. This all happens between the mobile and desktop breakpoints.

When it hits the mobile breakpoint it will stay a fixed size (example below - 16px). Same goes for desktop (example below - 35px).

The responsive size will never be smaller than the mobile font size or bigger than the desktop font size.

Example

h1 {
    // 16px - mobile font size
    // 35px - desktop font size
    @include font-size( 16px, 35px );
}

Gradients

Direction Colors
down / up / right / left List of colors (space separated)

Background

body {
    @include linear-gradient( down, red orange yellow green blue purple pink );
}

Text

h1 {
    @include text-background-gradient( left, rgba(255,255,255,0) #444444 );
}

Grid

Uses a 24 grid column structure.

col-1 is the smallest size column (4.16%).

Columns

<div class="container">
    <div class="row">
        <div class="col-1"> 1 </div>
        <div class="col-2"> 2 </div>
        <div class="col-3"> 3 </div>
        <div class="col-4"> 4 </div>
        <div class="col-5"> 5 </div>
        <div class="col-6"> 6 </div>
        <div class="col-7"> 7 </div>
        <div class="col-8"> 8 </div>
        <div class="col-9"> 9 </div>
        <div class="col-10"> 10 </div>
        <div class="col-11"> 11 </div>
        <div class="col-12"> 12 </div>
        <div class="col-13"> 13 </div>
        <div class="col-14"> 14 </div>
        <div class="col-15"> 15 </div>
        <div class="col-16"> 16 </div>
        <div class="col-17"> 17 </div>
        <div class="col-18"> 18 </div>
        <div class="col-19"> 19 </div>
        <div class="col-20"> 20 </div>
        <div class="col-21"> 21 </div>
        <div class="col-22"> 22 </div>
        <div class="col-23"> 23 </div>
        <div class="col-24"> 24 </div>
    </div>
</div>

Responsive

<div class="container">
    <div class="row">
        <div class="col-sm-1"> </div>
        <div class="col-md-1"> </div>
        <div class="col-lg-1"> </div>
        <div class="col-xl-1"> </div>
    </div>
</div>

Offset

<div class="container">
    <div class="row">
        <div class="col-1"> </div>
        <div class="offset-col-1"> </div>
    </div>
</div>

sass-helpers's People

Contributors

starlette avatar

Watchers

 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.