Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/KittyGiraudel/SassyCast
[UNMAINTAINED] Type conversion functions for Sass.
https://github.com/KittyGiraudel/SassyCast
Last synced: about 2 months ago
JSON representation
[UNMAINTAINED] Type conversion functions for Sass.
- Host: GitHub
- URL: https://github.com/KittyGiraudel/SassyCast
- Owner: KittyGiraudel
- License: mit
- Archived: true
- Created: 2014-01-27T10:21:14.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2021-03-05T15:00:29.000Z (almost 4 years ago)
- Last Synced: 2024-10-31T15:14:26.469Z (about 2 months ago)
- Language: SCSS
- Homepage: http://hugogiraudel.com/SassyCast
- Size: 305 KB
- Stars: 72
- Watchers: 4
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred-test - KittyGiraudel/SassyCast - [UNMAINTAINED] Type conversion functions for Sass. (SCSS)
- awesome-sass - SassyCast
README
# SassyCast
SassyCast is a simple API for type conversion in Sass.
## 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:
```scss
$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:
```scss
$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:
```scss
$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](http://twitter.com/marcmintel) for his help.