stylefmt icon indicating copy to clipboard operation
stylefmt copied to clipboard

Stylelint's color-hex-case option is handled incorrectly

Open vvs opened this issue 8 years ago • 1 comments

As far as I can tell, stylefmt looks up the color-hex-case and then uses the result to format not only the HEX cases, but other cases, like rgba and even plain colors.

So, if color-hex-case is set to "upper", then we end up with:

color: #AABBCC; // this one is correct
color: WHITE; // this one is incorrect, it should not be changed
color: RGBA(0,0,0,0); // this one is incorrect, it should not be changed

As a result, stylelint complains after applying stylefmt (whith color-hex-code set to 'upper'):

Expected "RGBA" to be "rgba"   function-name-case

Please consider removing uppercase/lowercase conversions for non-hex colors, since color-hex-case is only for the hex colors

vvs avatar Aug 29 '17 12:08 vvs

ditto here, anyone already working on this? I dont mind submitting a PR

oshalygin avatar Jun 30 '19 22:06 oshalygin