Is there anyway to specify a class
after a pseudo element? For example, I want to find the :last-child
of the parent - and if that child has x-class, style accordingly. With SCSS, this would be relatively easier, but the project I'm working on doesn't use SASS.
Any ideas?
Here's what I was trying to do...which is obvs wrong:
form .entry-form-wrap :last-child.nested-tmpl-inner
HTML is too complex to post, but I've included a general block of code to give you an idea of the flow:
<form>
<div class="entry-form-wrap">
<div class="some-class" />
<div class="some-class" />
<div class="some-class nested-tmpl-inner" />
</div>
</form>
:last-child
is), because simple selectors can be arranged in any order in a chain (with the exception of type/universal always appearing first). The selector that you have is valid, but a selector like::after.class
would be invalid. This is why the distinction between pseudo-elements and pseudo-classes is so important.