GoalSmashers/clean-css — pull request #306 by eric1234 (2014-06-27 22:40:14+00:00)
Title: Allows width keywords for border-width for side normalization.

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.

I'm may be too loose here. Adding the width keywords to cssUnitAnyRegexStr
will also means it will parse the following even though it is not
valid CSS.

div {margin: medium}

I guess it depends on if this tool is designed to validate just enough to
minify or if it also provides more general purpose linting. I assume the
former so my looseness is ok.