css-blocks icon indicating copy to clipboard operation
css-blocks copied to clipboard

Throw a meaningful error when there's a syntax mistake in composes

Open ramitha opened this issue 5 years ago • 1 comments

Currently, composes: a-block[type=butcher] (value is not in quotes) results in an error that's not meaningful, like the following.


[css-blocks] BlockSyntaxError: No Block named "b-block" found in scope. (xxx/card.block.scss:18:3)```

We should throw an error that suggest a quoting the value instead. 

ramitha avatar Aug 10 '20 22:08 ramitha

Perhaps support composes: 'text-body[weight=bold][size=small]'; in addition to composes: 'text-body[weight=bold]', 'text-body[size=small]'

ramitha avatar Aug 11 '20 17:08 ramitha