javascript-tutorial / en.javascript.info

Modern JavaScript Tutorial
https://javascript.info
Other
23.35k stars 3.84k forks source link

CSS selectors #1468

Open paroche opened 4 years ago

paroche commented 4 years ago

It might help to have some reference or discussion of CSS selectors before jumping in here with, say 'ul > li:last-child'. with 'a[href$="zip"]' close on its heels.

To look at the case of a tutorial-user chosen at random, I, for instance, was familiar with the simple selectors: tag, #id, and .class selectors, plus :pseudo-class and ::pseudo-element selectors, and may have seen (but not used) [attribute] selectors, but what I now have found described as "combinator" selectors (">", "-", "~") were (besides space " ") new and unfamiliar (though I'm glad to be acquainted with them now). Anyway, I've educated myself and am moving on, and they're not that hard to learn, but to have a little more info on them or a reference might help some other poor fool(s). 🤷‍♂️🤷‍♀️

Probably wouldn't hurt, in any case.

iliakan commented 4 years ago

We could give a link somewhere...

paroche commented 4 years ago

Would probably do more good than harm.