Git Product home page Git Product logo

pd-scss's Introduction

#pd-scss#

A little scss framework.

Compile only that parts to your css-file what you really need!

##Install## Bower: bower install pd-scss --save-dev

Git: git clone https://github.com/platdesign/pd-scss

Download: Zip

##Docs## A little documentation of pd-scss.

###Loader###

  • @include load-all;

    Loads all available modules of pd-scss. (Do you really need all?)

  • @include load-reset;

    Imports a modificated version of normalize.

  • @include load-load-font-beautifier;

    Makes fonts looking nicer.

  • @include load-breakpoints(400px 600px 800px 960px 1300px);

    Sets default breakpoints.

  • @include load-grid(1em);

    Loads a simple and responsive grid-system with grid-spacing of 1em.

      // Usage in HTML
      <div class="page">
      	<div class="row">
      		<div class="col-1-3">Hello</div>
      		<div class="col-2-3">World</div>
      	</div>
      </div>
    
  • @include load-page;

    A class for wrapping the whole page.

  • @include load-nav;

    Create nav-classes.

For the next ones have a look at the 'creators'-section.

  • @include load-img;

  • @include load-hint;

  • @include load-btn;

  • @include load-block;

###Creators###

####hint( name, color )####

// SCSS
@include hint(error, red);

// HTML
<div class="hint-error">An error has occurred</div>

####btn ( name )####

// SCSS
@include btn(valid) {
	background-color:green;
}

// HTML
<button class="btn-valid">Send</button>

####block( name, bgColor )#### Set's the font-color to the best-font-color (section: functions) of bgColor.

// SCSS
@include block(header, navy);

// HTML
<header class="block-header"></header>

###Mixins###

####Vendor-Prefixing#### Only two examples... ;) Works with each css-property which needs vendor-prefixes.

  • @mixin prefix( $key, $value, $prefixes, $prefixless:true )

      // Usage
      @include prefix(box-shadow, 0 0 5px 0 rgba(black, .4), webkit moz);
      
      // Result
      -webkit-box-shadow: 0 0 5px 0 rgba(black, .4);
      -moz-box-shadow: 0 0 5px 0 rgba(black, .4);
      box-shadow: 0 0 5px 0 rgba(black, .4);
    
  • @mixin animation ( $name, $duration:300ms, $delay:0, $ease:ease )

      // Usage
      @include animation(myAnimation);
      
      // Result
      -webkit-animation: myAnimation 300ms 0 ease;
      -moz-animation: myAnimation 300ms 0 ease;
      -ms-animation: myAnimation 300ms 0 ease;
      animation: myAnimation 300ms 0 ease;
    

###Functions###

  • @function brightness($color)

      // Usage
      $brightnessOfRed: brightness(red);
    
  • @function best-font-color($backgroundColor)

    Calculates the most human-readable font-color for given background.

      // Usage
      .myClass {
      	$bgColor: green;
      	background: $bgColor;
      	color: best-font-color($bgColor);
      }
    

##Contact##

pd-scss's People

Contributors

platdesign avatar

Watchers

James Cloos 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.