Skip to content
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.

Unrecognized functions used outside of CSS declaration groups are not caught by static checks #38

Closed
iflan opened this issue Oct 23, 2015 · 1 comment
Assignees

Comments

@iflan
Copy link
Member

iflan commented Oct 23, 2015

Originally reported on Google Code with ID 19

Example: 

/* Does not generate error. */
@def RANDOM_COLOR randomColor('light');


/* Correctly generates error: Unknown function "randomColor". */
button {
  color: randomColor('light');
}

Reported by cpeisert on 2012-05-29 02:48:58

@iflan
Copy link
Member Author

iflan commented Oct 26, 2015

@cpeisert, you are correct. However this should give you an error:

@def RANDOM_COLOR randomColor('light');

button {
   background-color: RANDOM_COLOR;
}

The reason is that the contents of @defs aren't checked until they are used.

Please re-open if this is not the case.

@iflan iflan closed this as completed Oct 26, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant