Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
austinlyons
· 11y ago · 0 comments
Wouldn't you just instead write the CSS as follows?
.sidebar.title { text-decoration: underline; }
Comments
[–]
talmand
11y ago
That 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 ago
Well, 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.