It would be great to be able to define a component like: site-search--full, however if we define a component as such, the following selector would be invalid:
Since the component is defined as .site-search--full it expects the second selector to be .site-search--full__field. However enforcing this standard would unnecessarily complicate markup:
There is a use case for having multiple versions of a component, built off the same component: see here
A real world example would be a site search form with a full-width variant.
It would be great to be able to define a component like:
site-search--full
, however if we define a component as such, the following selector would be invalid:Since the component is defined as
.site-search--full
it expects the second selector to be.site-search--full__field
. However enforcing this standard would unnecessarily complicate markup:I realize this could be fixed with weak mode, but that isn't ideal. What would be great is to be able to have a selector like this appear as valid:
.site-search--full .site-search__field
And a selector like this fail:
.site-search--full .other-component
Is there a way to do this currently with the tool? Do you feel it would be a useful feature?