Skip to content

Conversation

@perenciolo
Copy link

What do the changes you have made achieve?
Fix no support to #RRGGBBAA CSS 4 hex color on sass lint files
Have you included relevant documentation
https://drafts.csswg.org/css-color/#hex-notation
Which issues does this resolve?
#1267
<DCO 1.1 Signed-off-by: Gustavo Perenciolo contategustavoh@gmail.com>

return true;
}
return false;
return /^([a-f0-9]{8}|[a-f0-9]{6}|[a-f0-9]{4}|[a-f0-9]{3})$/i.test(str);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return /^([a-f0-9]{8}|[a-f0-9]{6}|[a-f0-9]{4}|[a-f0-9]{3})$/i.test(str);
return /^([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{3})$/i.test(str);

Your pattern did not match against hex values containing uppercase letters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants