Skip to content
This repository has been archived by the owner. It is now read-only.
[UNMAINTAINED] Type conversion functions for Sass.
CSS Ruby JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist Updated dist file for 2.0.1 Jul 6, 2017
lib Bumped version to 2.0.1 Jul 6, 2017
stylesheets Fix incorrect hexadecimal to base 10 conversion Jul 6, 2017
test Improved color and helper converters Jun 4, 2016
.gitignore Removed .idea/ and added it to .gitignore Mar 10, 2016
.sassdocrc Added configuration file for SassDoc Dec 31, 2014
CHANGELOG.md Bumped version to 2.0.1 Jul 6, 2017
LICENSE Added LICENSE file Jun 4, 2016
README.md Updated README.md Jun 4, 2016
SassyCast.gemspec Normalized comments and prepared the first ruby gem Jan 27, 2014
bower.json Bumped version to 2.0.1 Jul 6, 2017
eyeglass-exports.js Added Eyeglass support Jun 4, 2016
package.json Bumped version to 2.0.1 Jul 6, 2017
sache.json Update sache.json Feb 7, 2014

README.md

SassyCast

SassyCast is a simple API for type conversion in Sass. Read API documentation.

Installation

gem install SassyCast
bower install sassy-cast

Notes

SassCast has a strict mode in which it will throw errors when failing to cast values (most notably to colors and numbers). You can enable strict-mode with:

$sc-strict-mode: true;

In non-strict mode, when a value cannot be converted to a number, SassyCast will warn and return 0. You can change this value with:

$sc-non-strict-default-number: 0;

In non-strict mode, when a value cannot be converted to a color, SassyCast will warn and return transparent. You can change this value with:

$sc-non-strict-default-color: transparent;

Note that color formats are sometimes converted automatically by Sass depending on the type of syntaxe used (compressed, expanded, etc.). When casting a color to string, the resulting string can be different from the color input.

Credits

Huge thanks to Marc Mintel for his help.

You can’t perform that action at this time.