Consider the following HTML:
<div class="status-date">
<strong>Date Available:</strong>
10/05/2016
</div>
I'd expect the :not()
selector to be capable of targeting the date string "10/05/2016" as follows:
.status-date *:not(strong) {
text-decoration: underline;
}
Two questions:
1. Is the :not()
selector capable of this?
2. If not, is any CSS selector capable of this?
Context: this is actually not about styling the text nodes. I am doing some web scraping and I'd like to ignore the <strong>
tag in this case. If it were about styling, I could target the div
directly and overwrite the styles on the <strong>
to "cancel it out".
Further context: I can see that my naïve attempt doesn't work as expected. For example, as shown in this codepen: http://codepen.io/anon/pen/rWezQK But it's possible I'm misunderstanding something deep about the selector or the DOM structure I've described.