Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/strarsis/sass-math-pow
Math pow() polyfill/feature detection with non-integer exponents support for (without compass) ruby sass, sass and sass+eyeglass
https://github.com/strarsis/sass-math-pow
compass eyeglass feature-detection integer-exponents math math-pow polyfill pow ruby-sass sass-eyeglass
Last synced: about 1 month ago
JSON representation
Math pow() polyfill/feature detection with non-integer exponents support for (without compass) ruby sass, sass and sass+eyeglass
- Host: GitHub
- URL: https://github.com/strarsis/sass-math-pow
- Owner: strarsis
- License: mit
- Created: 2015-11-22T02:07:31.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-04-12T19:38:57.000Z (over 2 years ago)
- Last Synced: 2024-04-14T22:20:03.818Z (7 months ago)
- Topics: compass, eyeglass, feature-detection, integer-exponents, math, math-pow, polyfill, pow, ruby-sass, sass-eyeglass
- Language: SCSS
- Size: 84 KB
- Stars: 7
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sass-math-pow
[![david](https://david-dm.org/strarsis/sass-math-pow.svg)](https://david-dm.org/strarsis/sass-math-pow)
[![Build Status](https://travis-ci.org/strarsis/sass-math-pow.svg?branch=master)](https://travis-ci.org/strarsis/sass-math-pow)Math pow() polyfill/feature detection with non-integer exponents support
for (without compass) ruby sass, plain sass and sass+eyeglassIt will autodetect whether pow() with native non-integer exponents support is available (by eyeglass+sass with eyeglass-math) for full performance and also tries to intall it (as dependency of this package),
otherwise, in case of ruby sass without compass or plain sass, a pow() polyfill is used instead that supports pow() with non-integer exponents.This polyfill is useful for projects that may use pow() with non-integer exponents and should correctly caluclate across different sass variants and versions.
## Usage
````
> npm install --save-dev sass-math-pow
````
Note: To @import from npm packages/node_modules with ruby sass or plain sass (without eyeglass),
[sass-include-paths](https://github.com/strarsis/sass-include-paths) helper may be useful.
````
@import 'math-pow';
@debug poly-pow(9, 0.5); // =3 across different sass variants
````## Credits
- [`/` Dart SASS](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md#1330) fix and code improvements by [polarbirke](https://github.com/polarbirke).
- Performance and code improvements by [xi](https://github.com/xi).
- Polyfill by [drtimofey](https://github.com/drtimofey), script based on script by [davidkpiano](https://github.com/davidkpiano), see these links
- https://github.com/thoughtbot/bitters/issues/167
- https://github.com/thoughtbot/bourbon/issues/717
- https://gist.github.com/davidkpiano/ad6e6771df050ff3727f