W3C home > Mailing lists > Public > public-css-archive@w3.org > April 2017

Re: [csswg-drafts] [css-content][css-pseudo][css-cascade] Does content:contents in pseudo affect inheritance?

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Mon, 10 Apr 2017 21:18:53 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-293082128-1491859132-sysbot+gh@w3.org>
Each pseudo-element defines what its originating element is; that's what it inherits from.  Nothing inherits from a pseudo-element (unless/until we allow nesting pseudo-elements).

`content: contents` is not defined anywhere *near* sufficiently to actually be implemented, but the way it would have to work to be sane is to just reparent the child boxes from the originating element to the pseudo-element. Inheritance happens long before box construction, so the "Foo" text will definitely be red, as it inherits its color from the `span`, which inherits it from the `div`.

(The `contents` value needs to get dropped anyway; it only existed to enable the footnoting machinery; you'd move the contents of the element into a pseudo with `content: contents`, then do something with a property that I believed was called `move-to`, which has been removed, and leave behind a footnote marker with the `::marker` pseudo.  Since most of the machinery has been dropped, the `contents` value no longer does anything useful.)

GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1195#issuecomment-293082128 using your GitHub account
Received on Monday, 10 April 2017 21:19:00 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:11 UTC