Skip to content

Commit

Permalink
Merge pull request #2 from olegafx/patch-1
Browse files Browse the repository at this point in the history
Add 'fill' property
  • Loading branch information
rsanchez authored Jun 24, 2016
2 parents 73d6063 + 2269521 commit 8b05700
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ function CssColorExtractor() {
'outline',
'outline-color',
'text-shadow',
'box-shadow'
'box-shadow',
'fill'
];
var colorFormats = [
'hexString',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "css-color-extractor",
"version": "0.0.4",
"version": "0.0.5",
"description": "Extract from colors from CSS.",
"main": "index.js",
"keywords": [
Expand Down
9 changes: 9 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,15 @@ describe('postcss-colors-only', function () {
);
});

it('should extract fill.', function (done) {
test(
'svg { fill: red; } p { display: block; }',
['red'],
{},
done
);
});

it('should omit grey, but not black or white.', function (done) {
test(
'a { color: red; } p { color: grey; } h1 { color: black; }',
Expand Down

0 comments on commit 8b05700

Please sign in to comment.