Skip to content

Commit

Permalink
- support currentColor in ldcolor.web
Browse files Browse the repository at this point in the history
 - bump version
  • Loading branch information
zbryikt committed Oct 6, 2022
1 parent 1b54a49 commit 48b1200
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## v1.1.0

- support `currentColor` in `ldcolor.web`


## v1.0.1

- fix ReDoS vulnerability (RegEx adopted from d3-color, see: https://github.com/d3/d3-color/issues/97)
Expand Down
3 changes: 3 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@
var ret;
v == null && (v = this);
compact == null && (compact = false);
if (((v || '') + "").toLowerCase() === 'currentcolor') {
return v;
}
ret = utils.rgb(v);
if (ret.a != null && (isNaN(ret.a) || (!ret.a && ['r', 'g', 'b'].filter(function(it){
return ret[it] != null && isNaN(ret[it]);
Expand Down
2 changes: 1 addition & 1 deletion dist/index.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions dist/index.named.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,9 @@
var ret;
v == null && (v = this);
compact == null && (compact = false);
if (((v || '') + "").toLowerCase() === 'currentcolor') {
return v;
}
ret = utils.rgb(v);
if (ret.a != null && (isNaN(ret.a) || (!ret.a && ['r', 'g', 'b'].filter(function(it){
return ret[it] != null && isNaN(ret[it]);
Expand Down
Loading

0 comments on commit 48b1200

Please sign in to comment.