Skip to content

Conversation

@cscott
Copy link
Contributor

@cscott cscott commented Feb 5, 2016

I've updated several simple ValidationType functions to show how this can be used to simplify common matchers. It will also be used in a follow-up patch to validate the font-variant-alternates property which involves a large number of CSS function options.

part.name === 'saturate' ||
part.name === 'sepia');
// custom() isn't actually in the spec
return ValidationTypes.isLiteral(part, "blur() | brightness() | contrast() | custom() | drop-shadow() | grayscale() | hue-rotate() | invert() | opacity() | saturate() | sepia()");
Copy link
Member

Choose a reason for hiding this comment

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

Maybe break this? Otherwise the patch looks good as far as I can tell.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

I've updated several simple ValidationType functions to show how this
can be used to simplify common matchers.  It will also be used in a
follow-up patch to validate the `font-variant-alternates` property
which involves a large number of CSS function options.
@cscott cscott force-pushed the function-literals branch from cc7de2c to 7fcf5aa Compare February 5, 2016 21:10
@XhmikosR XhmikosR added this to the v0.2.6 milestone Feb 5, 2016
XhmikosR added a commit that referenced this pull request Feb 5, 2016
Allow matching functions as literals.
@XhmikosR XhmikosR merged commit 9b9997d into CSSLint:master Feb 5, 2016
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