LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

  
  
    
    

Stylus Mixin for Linear Gradients

Augmented to support comma-separated splat arguments.

CSS
:root {
  background-color: #ffa500;
  background-image: -webkit-linear-gradient(right, #f00, #ffa500, #ff0, #008000, #00f, #4b0082, #ee82ee);
  background-image: -moz-linear-gradient(right, #f00, #ffa500, #ff0, #008000, #00f, #4b0082, #ee82ee);
  background-image: -ms-linear-gradient(right, #f00, #ffa500, #ff0, #008000, #00f, #4b0082, #ee82ee);
  background-image: -o-linear-gradient(right, #f00, #ffa500, #ff0, #008000, #00f, #4b0082, #ee82ee);
  background-image: linear-gradient(right, #f00, #ffa500, #ff0, #008000, #00f, #4b0082, #ee82ee);
}
div {
  margin: auto;
  padding: 10px 40px 30px;
  position: relative;
  text-align: center;
  background-color: rgba(0,0,0,0.3);
  background-image: -webkit-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.3));
  background-image: -moz-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.3));
  background-image: -ms-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.3));
  background-image: -o-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.3));
  background-image: linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.3));
}
div h1 {
  font: bold 2.2em FreeSans, Helvetica, Arial, sans-serif;
  color: rgba(255,255,255,0.5);
}
div h2 {
  font: bold 1.1em FreeSans, Helvetica, Arial, sans-serif;
  color: rgba(255,255,255,0.5);
}

Description

Stylus mixin for linear gradients with support for comma-separated splat arguments. In part created as a work-around / abstraction for this issue: http://cygnul.com/1hsRBh8
Term
Wed, 11/29/2017 - 13:47

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv