linkedin / css-blocks

High performance, maintainable stylesheets.
http://css-blocks.com/
BSD 2-Clause "Simplified" License
6.33k stars 152 forks source link

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

Open ramitha opened 3 years ago

ramitha commented 3 years ago

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 commented 3 years ago

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