Giter Site home page Giter Site logo

super-gradient's Introduction

SuperGradient

SASS MULTI-COLOR GRADIENT MIXIN (LINEAR & RADIAL)

Options

$type: linear*, radial

$from: top*, left, top left, top right, bottom right, bottom left, center (radial)

$colors: hex, rgba

* default

Include

bower install super-gradient

super-gradient's People

Stargazers

 avatar  avatar Wonow Lau avatar José Morales avatar Denys Nosov avatar Denis Craig avatar Andrew Hathaway avatar  avatar  avatar Tyler King avatar Martijn Gussekloo avatar Viken avatar Valentin Palkovic avatar Patrick Connors avatar Oğuz Çelikdemir avatar KB avatar  avatar Koichi Tamiya avatar Satoshi Homura avatar Kenichi Hasegawa avatar Taka avatar Mamoru Christopher Tsujimoto avatar shimakyohsuke avatar Tomohiro Terashima avatar Kaya avatar Roger Gros avatar Dil Ahdan avatar Alex Miller avatar Daniel Grijuela avatar Danila Kutkevich avatar Michael Mifsud avatar 任为 avatar missour pro avatar Matt H avatar Guillaume Quimper avatar Omar Bahareth avatar Ferri Sutanto avatar James Mosier avatar Yury Druzhkov avatar Chris Gray avatar Peter Brinck avatar Alexandr Stets avatar handala avatar Erik Ochoa avatar Soundarapandian Rathinasamy avatar Austris avatar Chris Lown-Smith avatar Tobiasz Walczak avatar Filipe Oliveira avatar Rafal Klimek avatar Craig Sheen avatar Andy Hoffman avatar Harris Novick avatar Ya Zhuang avatar Rothana Choun avatar Javier Sánchez - Marín avatar Chris Lee avatar  avatar Ted Whitehead avatar Jeremy Bunting avatar  avatar Jim Smith avatar Ian Hamilton avatar Conor McAfee avatar Mannuel Ferreira avatar Thiago Braga avatar Arnaud B. avatar Dan Duncan avatar Matteo Cavucci avatar Ruandré Janse van Rensburg avatar Torsten Baldes avatar Sebastian Kessler avatar Saneef Ansari avatar Dexter Urbanski avatar Jakub Belko avatar

Watchers

James Cloos avatar Stephan Lück avatar Dexter Urbanski avatar  avatar Mohammed Ibrahim avatar  avatar

super-gradient's Issues

Use `index` for `contains`

Use index or not not index if you absolutely want a boolean rather than using a loop for contains function.

@function contains($haystack, $needle) {
  @return not not index($haystack, $needle);
}

Use an arglist rather than a custom list

You could dramatically lighten your code by using an arglist rather than a custom-formatted list for color-stops. Then you would not need the colorString and colorSubString functions.

What about something like this (shorten on purpose)?

@mixin sgradient($direction, $type, $args...) {
  background: #{$type}-gradient($direction, $args...);
}

.element {
  @include sgradient(to bottom, linear, purple 0%, red 25%, yellow 50%, green 75%, blue 100%);
}

Use hyphens rather than camelCase

CSS (and Sass) is an hyphen-powered language. We don't use camelCase at all. You might want to stick to hyphen as a convention. :)

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.