- From: ExE Boss via GitHub <sysbot+gh@w3.org>
- Date: Tue, 16 Oct 2018 09:28:23 +0000
- To: public-css-archive@w3.org
ExE-Boss has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-selectors] Standardize `:(-moz-)first-node` and `:(-moz-)last-node` == Right now, **CSS Selectors 4** defines [`:first-child`](https://developer.mozilla.org/docs/Web/CSS/:first-child) and [`:last-child`](https://developer.mozilla.org/docs/Web/CSS/:last-child), which works as such for the following: ```css span:last-child { background-color: lime; } ``` ```html <div> <span>This doesn’t match.</span> <span>This matches.</span> </div> <div> <span>This matches.</span> Some text after. </div> ``` For [`:first-node`](https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-first-node) and [`:last-node`](https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-last-node), this would work as follows: ```css span:last-node { background-color: lime; } ``` ```html <div> <span>This doesn’t match.</span> <span>This matches.</span> <!-- White-space and comments are ignored when determining whether :last-node matches --> </div> <div> <span>This doesn’t match.</span> Some text after. </div> ``` **Mozilla Firefox** already implements the previous in prefixed form and exposes it to the web. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3216 using your GitHub account
Received on Tuesday, 16 October 2018 09:28:31 UTC