Giter VIP home page Giter VIP logo

sass-mixins's Introduction

SASS Mixins

A collection of SASS mixins for your project.

Available via Bower

You can download the mixins through Bower:

bower install lib-sass-mixins

Mixins examples

Animation

.class { @include animation(animationName 1s); }

Keyframes

@include keyframes(animationOne) {
    from { background-color: red; }
    to { background-color: black; }
}

Background size

.class { @include background-size(auto 100%); }

Box shadow

.class { @include box-shadow(1px 1px 10px 10px #666, 2px 2px 5px 5px #ddd inset); }

Opacity

.class { @include opacity(0.5); }

Clearfix

.class { @include clearfix(); }

Border-radius

.class { @include border-radius(10px); }

Border-top-Radius

.class { @include border-top-radius(10px); }

Border-bottom-Radius

.class { @include border-bottom-radius(10px); }

Border-left-Radius

.class { @include border-left-radius(10px); }

Border-right-Radius

.class { @include border-right-radius(10px); }

Box-sizing

.class { @include box-sizing(); }

Transition

.class { @include transition(color 1s .5s ease-out); }

Columns

.class { @include columns(3, 150px, solid 1px red); }

Transform

Default

.class { @include transform(rotate(45deg); }

Translate

.class { @include translate(100px, 100px); }

Skew

.class { @include skew(10px, 10px); }

Scale

.class { @include scale(0.75); }

Rotate

.class { @include rotate(45deg); }

Transform-origin

.class { @include transform-origin(left, top); }

Gradients

Linear horizontal (simple)

Only start and end color.

.class { @include horizontal-gradient(#666, #000); }

Linear horizontal (multiple)

The first color is the background color and the other are steps of gradient.

.class { @include horizontal-gradient(#666, #000 50%, #444 80%); }

Linear vertical (simple)

Only start and end color.

.class { @include vertical-gradient(#666, #000); }

Linear vertical (multiple)

The first color is the background color and the other are steps of gradient.

.class { @include vertical-gradient(#666, #000 40%, #333 75%); }

Absolute Center

Reference

.class {
    @include absolute-center(5%, 0, none, 0);
}
.class {
  position: absolute;
  top: 5%;
  right: 0;
  left: 0;
  margin: auto;
}

Font-family

.class { @include font-face("helvetica","../font/helvetica"); }

sass-mixins's People

Contributors

raphaelfabeni avatar neysimoes avatar lucasmazza avatar

Stargazers

Allef Br avatar Bruno Campos avatar José Cage  avatar Júlio Carneiro avatar  avatar Daniel MV avatar Hemerson Vianna avatar DaveStacey avatar Luís Felipe Souza avatar Ruan Aragão avatar Daniel Torres avatar Gabriel Sepulveda avatar Andrii Akulov avatar Arthur Taurino avatar Marcos Lima avatar Kenner Kliemann avatar Caio Caprio avatar Renato Contaifer avatar dyego severo avatar Victor Serpa avatar Fabricio Silva avatar João Pedro Nascimento avatar Dênis Nunes avatar Diogo Beda avatar Guilherme Louro avatar Marcio Massari avatar Matheus Murbach avatar Victor Miguez avatar Hugo de Oliveira avatar  avatar Matheus Carmo avatar Gabriel Pedro avatar Marcelo Brito avatar Thiago Duarte avatar Mateus Vahl avatar Roberto Porlan avatar Jaqueline Venturim avatar Evandro Ribeiro avatar Jonathan Barratt avatar Roger Ramos avatar  avatar

Watchers

Bruno Campos avatar James Cloos avatar  avatar Roger Ramos avatar Caio Caprio avatar Renan Pupin avatar Dani Soldera avatar Lucas Godinho avatar

sass-mixins's Issues

Mixin Opacity

Hoje o mixin para opacidade é esse:

@mixin opacity($value) {
     $ie: $value * 100;
    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=$ie)";
    filter: alpha(opacity=$ie);
    -khtml-opacity: $value;
     -moz-opacity: $value;
             opacity: $value;
}

Eu fiz alguns testes com esse mixin e aparentemente funcionou em todos os navegadores.

@mixin opacity($value) {
    opacity: $value;
    filter: alpha(opacity=($value * 100));
}

No Can I Use não encontrei nenhum prefixo. E fiz alguns testes no IE e o filter segurou a onda.
O que você acha?

Add .editorconfig

It is common some developers use 4 spaces for indentation. But there are others developers that use 2, and other that use 3, and others..

What do you think about add a .editorconfig?

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.