SlexAxton / css-colorguard

Keep a watchful eye on your css colors.
2.44k stars 65 forks source link

whitelist ignores short HEX values #30

Closed XOP closed 8 years ago

XOP commented 8 years ago

this will work

['#f7f7f7', '#ffffff']

this will not

['#f7f7f7', '#fff']
XOP commented 8 years ago

what's more

227:3   ‼  #000 collides with #000000 (31:29) [css-colorguard]
243:3   ‼  #000 collides with #000000 (31:29) [css-colorguard]

:disappointed:

ben-eb commented 8 years ago

I quite like that actually. It ensures that you define your hex colours consistently. :smile:

XOP commented 8 years ago

@ben-eb well, kinda :) My implied stack finally worked with such "genuine" whitelist:

#ffffff #ffffff
#000000 #000000 

it's my format in css file, it's transformed into arrays collection on fly

ben-eb commented 8 years ago

You can use https://github.com/SlexAxton/css-colorguard#allowequivalentnotation to suppress warnings for equivalent colour definitions now.