Closed chrisfrancis27 closed 11 years ago
as a temporary fix, you could pass an empty string as the 2nd param. but I agree, this needs to be fixed
Ha, I never even thought of passing an empty string! That would work as a workaround for now. Thanks!
The image mixin generates invalid syntax when using either the
cover
orcontain
keyword. For example (using Stylus):Becomes:
You can see that the CSS outside the media query is correct, using the
cover
keyword on its own. However, the media query rule takescover
as the first argument and then appendsauto
as the second, which is invalid. Similarly, specifyingcover cover
would also be invalid, as the keyword must only appear on its own.It would be good if the parser could detect when either the
cover
orcontain
keyword is used and omit the second argument.See this MDN article for more info.
Cheers, Chris