2.0.1 • Published 3 years ago

@fylgja/sass v2.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

Fylgja - Sass Extend

NPM version GitHub Workflow Status License

Add more super powers to your Sass project.

This repo will add more functions and adds options not found in the core sass project.

Installation

npm install @fylgja/sass

How to use

Since this is a Sass function library it require only usages where it is needed.

So if you need to string replace something.

Then include the specific sass typed function via;

@use "@fylgja/sass/string" as str;

.str-replace {
    content: str.replace("Hello World", "World", "🌍");
}

We advice to use the library with a prefixed @use. Similar to an @use "sass:string".

This package offers the following functions.

Function NameTypeDescription
luminancecolorCalculate the luminance for a color
contrast-ratiocolorCalculate the contrast ratio between two colors
contrastcolorSets an dark or light color based on the contrast
graycolorGet a specific gray based an a given precentage
nth-sidelistExtract value based on shorthand sizing property
negativemapConverters a map with units to a negative units
strip-unitmathRemoves the unit (e.g. px, em, rem) from a value
replacestringReplace part of a string with new value
url-encodestringEncode Unsafe urls to safe urls
svg-urlstringUse SVG anywhere as dataUri (inline background)
2.0.1

3 years ago

2.0.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago