Skip to content

Commit

Permalink
Update HSL regular expression
Browse files Browse the repository at this point in the history
  • Loading branch information
htunnicliff authored and Qix- committed Jul 17, 2021
1 parent 0264546 commit 6f73e20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ cs.get.hsl = function (string) {
return null;
}

var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;
var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?[\d\.]+)\s*)?\)$/;
var match = string.match(hsl);

if (match) {
Expand Down

0 comments on commit 6f73e20

Please sign in to comment.