Micro.blog

colinwalker
colinwalker

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

In reply to
matthew
matthew

@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

colinwalker
colinwalker

@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.

matthew
matthew

@colinwalker yeah, I always avoid JS to do things with CSS like that.