Re: [csswg-drafts] [css-selectors] Standardize `:(‑moz‑)first‑node` and `:(‑moz‑)last‑node` (#3216)

I just needed this same selector for a project I was working on today. I would like to target a span tag that exists in a block of text. If it is not the first node, I would like to apply `margin-left` to space it away from the text to its left, and it is not the last node, I would like to apply `margin-right` to space it away from the text to its right. Unfortunately, this isn't currently possible in pure CSS, because one span tag inside a body of other text will match both `:first-child` and `:last-child` even though it is neither the first nor the last node.

-- 
GitHub Notification of comment by brandonmcconnell
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3216#issuecomment-811296714 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 31 March 2021 18:05:57 UTC