Sign up now: free 10-day trial
CSS needs full dependency selectors.
There, I’ve said it. Not that I’m the first and certainly won’t be the last.
CSS should let you choose what to do with something based on what’s inside it but this... colinwalker.blog
@colinwalker what if you think of it the other way around, apply the margin/padding to the top and then the last p will always have no bottom one. If you want to remove top from first use p:first
@matthew That's certainly an option (/me chides himself for always looking for the hard way 😆) but the overall point is still that CSS needs dependency as other circumstances won't be as easy to resolve.
@colinwalker yeah, I always avoid JS to do things with CSS like that.