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.
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
.specialButton
is inside of abutton
element (without the requirement forelement
to be abutton
)?Or is it whitespace sensitive (i.e.
button.specialButton
!=button .specialButton
)?It's whitespace that's important:
button.specialButton
- abutton
with the classspecialButton
button .specialButton
- any element with the classspecialButton
that's anywhere inside a button.button#verySpecialButton
- abutton
with the idverySpecialButton
button #verySpecialButton
- any element with the idbutton
that's anywhere inside a button.