5 ms·
Wouldn't you just instead write the CSS as follows? .sidebar.title { text-decoration: underline; }
by austinlyons 11y ago
Wouldn't you just instead write the CSS as follows?
.sidebar.title {
text-decoration: underline;
}
- talmand 11y agoThat likely wouldn't have the intended effect as I find it doubtful that the element with the sidebar class would also be the title.
- lstamour 11y agoWell, you could also write .sidebar > .title to be more specific than simply all .title elements in .sidebar, but the point is to not tie your CSS quite so closely to the HTML hierarchy I suppose.