npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

color-claim-sass

v1.1.0

Published

color-claim-sass is Sass a color library, with a set of accompanying functions, classes and mixins. They are based on Tobias van Schneider's Color Claim. See all the color swatches over at http://www.vanschneider.com/colors/

Downloads

15

Readme

Color Claim

Latest version Build Status Dependency Status

color-claim-sass is a Sass color library, with a set of accompanying functions, classes and mixins. They are based on Tobias van Schneider's Color Claim. See all the color swatches over at http://www.vanschneider.com/colors/

Installation

NPM

npm install --save color-claim-sass installs color-claim-sass. Copy the scss or css files to your assets. Alternatively, use @import "path/to/node_modules/color-claim-sass/color-claim"; in your Sass project.

CDN

Download the latest version through via RawGit.

Import all CSS classes in your website using <link rel="stylesheet" href="https://cdn.rawgit.com/jeroenptrs/color-claim-sass/1d7af7f2/css/color-claim.min.css">

Usage

Function

color-claim($color, $claim[, $percentage])

$color selects the corresponding Color Claim swatch and accepts a number from 1 to 102. $claim accepts "bg", "text" or "mix" as value. This respectfully returns the background and text Color Claim colors that are stored in $color-claim, or mixes them together.

If you mix the colors together, you can add an extra parameter $percentage to set the weight of the mix. This percentage is 50% by default, i.e. "bg" and "text" have equal weight in the mix. Setting percentage to 0% equals to color-claim($color), 100% equals to color-claim($color, "text").

You should use this if you want to set something else than background-color or color. In case of setting background-color and/or color to their respective Color Claim values, use the mixin instead.

Mixin

@include color-claim($color[, $claim])

This mixin sets your element's background and/or text colors to the corresponding Color Claim values. $color selects the corresponding Color Claim swatch.

Not passing a value for $claim automatically sets both, passing "bg" or "text" as value respectfully only sets background-color and color.

Passing "inv" as a value sets the inverse: background-color to the corresponding "text" color and color to the "bg" color.

Classes

.color-claim-#{$color}
.color-claim-bg-#{$color}
.color-claim-text-#{$color}
.color-claim-inv-#{$color}

You can use the following classes if you really need to use it as a class (f.e. in HTML, jQuery, ...). In any other cases - like the ones addressed above - just use the mixin or the function.

$color can be any Color Claim swatch (1-102). Use .color-claim-#{$color} to set both the background-color and color attributes.

.color-claim-bg-#{$color} only sets background-color attribute, .color-claim-text-#{$color} only sets color.

If you want to set the inverse: .color-claim-inv-#{$color} sets background-color attribute to the color value (and vice versa).

Silent Classes

$_silent: true

You can also set all classes as silent, so they won't compile to your css. Before importing color-claim-sass in your project, create a variable $_silent and set it to true.

All classes will still be available in Sass, just use @extend %color-claim[-bg/-text/-inv]-#{$color}.