ben-eb / colormin Goto Github PK
View Code? Open in Web Editor NEWTurn a CSS color into its smallest representation.
License: MIT License
Turn a CSS color into its smallest representation.
License: MIT License
Can you please update color
. It is 2.0.0 already.
Input:
-webkit-tap-highlight-color: rgba(0,0,0,0);
Output:
-webkit-tap-highlight-color: transparent;
The ES6 change threw us for a loop this morning. We're using node 0.10.x in one part of our build (but only for a little while longer!), and we had builds start failing this morning. The reason appears to be the the upgrade of colormin to 1.0.3. Babel's output on src/lib/toLonghand.js
uses Symbol
, which isn't defined in node 0.10.x.
We get the following error:
ModuleBuildError: Module build failed: ReferenceError: Symbol is not defined
This isn't a huge deal for us, but I figured someone else might have the same problem, so the neighborly thing to do would be to report it.
We'll probably either shrinkwrap with the previous version, or push through a node upgrade. :)
When i'm building with postcss
, I receive the error originating from colormin
:
ERROR in ./~/css-loader?sourceMap!./~/postcss-loader/lib?sourceMap!./~/sass-loader?sourceMap!./src/static/scss/common.scss
Module build failed: TypeError: c.hslaString is not a function
at exports.default (<path/to/project>\node_modules\colormin\dist\index.js:59:26)
at <path/to/project>\node_modules\postcss-colormin\dist\index.js:53:53
at <path/to/project>\node_modules\postcss-colormin\dist\index.js:29:22
at Array.forEach (<anonymous>)
at walk (<path/to/project>\node_modules\postcss-colormin\dist\index.js:28:18)
at transform (<path/to/project>\node_modules\postcss-colormin\dist\index.js:48:5)
at <path/to/project>\node_modules\postcss-colormin\dist\index.js:74:20
at <path/to/project>\node_modules\postcss\lib\container.js:192:28
at <path/to/project>\node_modules\postcss\lib\container.js:148:26
at Rule.each (<path/to/project>\node_modules\postcss\lib\container.js:114:22)
at Rule.walk (<path/to/project>\node_modules\postcss\lib\container.js:147:21)
at <path/to/project>\node_modules\postcss\lib\container.js:150:32
at Root.each (<path/to/project>\node_modules\postcss\lib\container.js:114:22)
at Root.walk (<path/to/project>\node_modules\postcss\lib\container.js:147:21)
at Root.walkDecls (<path/to/project>\node_modules\postcss\lib\container.js:190:25)
at <path/to/project>\node_modules\postcss-colormin\dist\index.js:73:20
at LazyResult.run (<path/to/project>\node_modules\postcss\lib\lazy-result.js:274:20)
at LazyResult.asyncTick (<path/to/project>\node_modules\postcss\lib\lazy-result.js:189:32)
at LazyResult.asyncTick (<path/to/project>\node_modules\postcss\lib\lazy-result.js:201:22)
at LazyResult.asyncTick (<path/to/project>\node_modules\postcss\lib\lazy-result.js:201:22)
at LazyResult.asyncTick (<path/to/project>\node_modules\postcss\lib\lazy-result.js:201:22)
at LazyResult.asyncTick (<path/to/project>\node_modules\postcss\lib\lazy-result.js:201:22)
at LazyResult.asyncTick (<path/to/project>\node_modules\postcss\lib\lazy-result.js:201:22)
at <path/to/project>\node_modules\postcss\lib\lazy-result.js:194:27
at <anonymous>
@ ./src/static/scss/common.scss 4:14-205
Doesn't work with color: inherit;
which is a valid declaration.
Event if browser supports the keyword transparent. It's not always valid for all rules. The color property for example does not have transparent as a value. Which mean IE10 does not allow transparency for color, but will allow rgba(0, 0, 0, 0). This seems less of and issue for other browsers.
https://www.w3.org/TR/CSS21/colors.html#propdef-color
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.