I read the spec, but I can't understand what "scoping" means, or at least I don't understand what it is useful for.
For example, I would think that in the following example only the p inside of .two is styled:
https://codepen.io/anon/pen/MrmqeX
But instead what I see is something like "Because there exists an element with class .two anywhere on the page, then apply this style in global scope which applies to all elements on the page even if they are outside of the element with class .two".
I was hoping that styles inside of the @element query would apply only to elements that are found inside of the element(s) targeted with @element. This would be similar to nesting in SASS/LESS/Stylus.
Is this not the case? Do you mean to rather do something like "If there is a <video> element anywhere on the page, then style the whole page in some way"?
I read the spec, but I can't understand what "scoping" means, or at least I don't understand what it is useful for.
For example, I would think that in the following example only the
pinside of.twois styled:https://codepen.io/anon/pen/MrmqeX
But instead what I see is something like "Because there exists an element with class
.twoanywhere on the page, then apply this style in global scope which applies to all elements on the page even if they are outside of the element with class.two".I was hoping that styles inside of the
@elementquery would apply only to elements that are found inside of the element(s) targeted with@element. This would be similar to nesting in SASS/LESS/Stylus.Is this not the case? Do you mean to rather do something like "If there is a
<video>element anywhere on the page, then style the whole page in some way"?