Giter Site home page Giter Site logo

sassmixins's Introduction

Elzero Sass Mixins

A collection of useful SASS Mixins

This Package Include

Css3 Properties Vendor Prefixer

Accept Arguments

  1. Property Name
  2. Property Values
  3. Vendor Prefixes

Example

.class {
  @include prefixer(transition, all .3s ease, webkit moz o);
}

Output

.class {
  -webkit-transition: all .3s ease;
  -moz-transition: all .3s ease;
  -o-transition: all .3s ease;
  transition: all .3s ease;
}

Opacity

Accept Arguments

  1. Property Value

Example

.class {
  @include opacity(.5);
}

Output

.class {
  zoom: 1;
  filter: alpha(opacity=50);
  opacity: 0.5;
}

Animation Keyframes

Accept Arguments

  1. Animation Name

Example

@include keyframes(BigFont) {
  from {
    font-size: 10px;
  }
  to {
    font-size: 20px;
  }
}

Output

@-webkit-keyframes BigFont {
  from {
    font-size: 10px;
  }
  to {
    font-size: 20px;
  }
}
@-moz-keyframes BigFont {
  from {
    font-size: 10px;
  }
  to {
    font-size: 20px;
  }
}
@keyframes BigFont {
  from {
    font-size: 10px;
  }
  to {
    font-size: 20px;
  }
}

Overlay

Accept Arguments

  1. Color
  2. Opacity

Example

.class {
  @include overlay(black, .5);
}

Output

.class {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

Centerer

Accept Arguments

No

Example

.class {
  @include centerer();
}

Output

.class {
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
  -o-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

Circle

Accept Arguments

  1. Dimensions Width And Height Must Be The Same

Example

.class {
  @include circle(100px);
}

Output

.class {
  width: 100px;
  height: 100px;
  border-radius: 50%;
}

Placeholder

Accept Arguments

No

Example

.class {
  @include placeholder {
    color: #EEE;
  }
}

Output

.class ::-webkit-input-placeholder {
  color: #EEE;
}
.class ::-moz-placeholder {
  color: #EEE;
}
.class :-ms-input-placeholder {
  color: #EEE;
}
.class :-moz-placeholder {
  color: #EEE;
}

Cover

Accept Arguments

No

Example

.class {
  @include cover();
}

Output

.class {
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

sassmixins's People

Contributors

osamaelzero avatar

Watchers

James Cloos avatar ramin sherwani 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.