I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
I'm Calin Baenen – AKA KattyTheEnby – a programmer born October 30th, 2006.
I love programming, it has been my passion since I was a kid, and will forever be my passion.
But doesn't that only work if the item with .specialButton is inside of a button element (without the requirement for element to be a button)?
Or is it whitespace sensitive (i.e. button.specialButton != button .specialButton)?
I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
I may be misunderstanding, but this would do what you want:
button.specialButton.But doesn't that only work if the item with
.specialButtonis inside of abuttonelement (without the requirement forelementto be abutton)?Or is it whitespace sensitive (i.e.
button.specialButton!=button .specialButton)?It's whitespace that's important:
button.specialButton- abuttonwith the classspecialButtonbutton .specialButton- any element with the classspecialButtonthat's anywhere inside a button.button#verySpecialButton- abuttonwith the idverySpecialButtonbutton #verySpecialButton- any element with the idbuttonthat's anywhere inside a button.