On a page, I have two paragraphs, both of which are identified via .entry p
selector. However, the first one also includes a timestamp, which is marked with .time
selector – the code looks like this:
<div class="entry">
<p><span class="time">17:25:22</span> Sed ut perspiciatis, unde omnis iste natus.</p>
<p>Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit?</p>
</div>
Now, is it possible apply different rules to those two paragraphs without introducing new selectors? Like, because of the condition that the first one contains this span class="time"
, and the second one does not?
` by index satisfies that. The hypothetical selector they'd be looking for would target any `
` that has a `.time` child. It's not possible.
– Tyler Roper Jun 19 '17 at 15:11