Fixes #305 - allows width keywords in border-width.
authorEric Anderson <eric@pixelwareinc.com>
Fri, 27 Jun 2014 22:19:20 +0000 (18:19 -0400)
committerJakub Pawlowicz <contact@jakubpawlowicz.com>
Sun, 29 Jun 2014 12:11:40 +0000 (13:11 +0100)
commitb9eb5c17c9b60b09c37a6078b95ca4d84dba6d25
tree0a8ed8eb5a379fd65426b9cabb0d4aec07168744
parentdf7844f5541613496ecb75fdb590e92cd2680bd7
Fixes #305 - allows width keywords in border-width.

When not all sides are specified for things like border/padding/margin
it appears clean-css attempts to normalize the data
(i.e "2px 5px" -> "2px 5px 2px 5px"). This normalization appears to
only look for things matched to cssUnitAnyRegexStr. cssUnitAnyRegexStr
doesn't include width keywords.

The width keywords were already specified for validating outline width.
This commit renames that list to be more generic (just widthKeywords). It
then adds this list to the cssUnitAnyRegexStr regexp.

This commit fixes #305. In addition I added "initial" to the list of
width keywords to fix gruntjs/grunt-contrib-cssmin#103 which is the
issue that lead me to writing this patch. So this commit should solve
that as well.
History.md
lib/properties/validator.js
test/data/issue-305-min.css [new file with mode: 0644]
test/data/issue-305.css [new file with mode: 0644]