... and then for the solution it's "converted" to an element with class submit. This is pretty confusing, because the solution not only suggesting using @extend, but also refactors the DOM. I know you shouldn't reach into nested components however, so the following is not good:
.search-form {
> .search-button { /* ... */ }
}
But then I don't quite follow how good is @extend as a solution to a non-problem in the first place. I am pretty confused.
In section Simplifying nested components the example given is this:
It curious how the "search button" is labeled as a component (or a nested component in this example) rather than an element, such as:
... and then for the solution it's "converted" to an element with class
submit
. This is pretty confusing, because the solution not only suggesting using@extend
, but also refactors the DOM. I know you shouldn't reach into nested components however, so the following is not good:But then I don't quite follow how good is
@extend
as a solution to a non-problem in the first place. I am pretty confused.I guess my question is pretty much aligned with https://github.com/rstacruz/rscss/issues/9 at this point, although I would like to hear more on this.
Thanks