Socket
Socket
Sign inDemoInstall

candy.scss

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    candy.scss

Sass utility to create gradient effects across elements in CSS.


Version published
Weekly downloads
4
decreased by-20%
Maintainers
1
Install size
6.25 kB
Created
Weekly downloads
 

Readme

Source

candy.scss

A Sass utility to produce duplicate CSS with many different colors. Let's say you've got six elements, and you want each one to have a different set of colors. You might write CSS like this:

.box:nth-child(1) { color: red; }
.box:nth-child(1) { color: #a06000; }
.box:nth-child(1) { color: #c04000; }
.box:nth-child(1) { color: #df2000; }
.box:nth-child(1) { color: purple; }

candy.css streamlines this down to one chunk of CSS. You tell the mixin what the start and end colors of the gradient, and how many elements you need.

.box {
  @include candy(red, purple, 5) {
    color: candy-color();
  }
}

Keywords

FAQs

Last updated on 12 Jul 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc