Is it possible to style an element if it's tag is elementtag and has the class myclass.
Consider this pseudo-CSS:
button & .specialButton {
/* Add special button styling here. */
}
Is it possible to style an element if it's tag is elementtag and has the class myclass.
Consider this pseudo-CSS:
button & .specialButton {
/* Add special button styling here. */
}
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (3)
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.