w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.37k stars 642 forks source link

[css-selectors] Div selector patterns aliases #1893

Open Array23 opened 6 years ago

Array23 commented 6 years ago
use div.foo as myDiv;
use div.bar > li.baz as anotherDiv;
myDiv > anotherDiv {
                                     //             ....style...
}

I just tought this could be useful, If you want to exactly specify every div and it's tree in selector, it wold make whole words unnecessary in coding styles. I know there are pre proccessors, but internet is about standardization, isn't it?

SelenIT commented 6 years ago

There is the Custom Selectors proposal in the CSS Extensions draft. Doesn't it solve the same problem as your proposal?