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

Re: [csswg-drafts] [css-cascade][css-pseudo] How does 'inherit' keyword behave in a child of ::first-line?

From: François REMY via GitHub <sysbot+gh@w3.org>
Date: Wed, 10 May 2017 17:25:32 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-300553985-1494437131-sysbot+gh@w3.org>
I wanted to note there is a TLDR just above but if I have to summarize even more, the proposed resolution for next week is:
> Inheriting properties of inline fragments that are contained in a ::first-line only inherit from the ::first-line if those properties (1) do apply to ::first-line, (2) do inherit by default, and (3) are not custom properties. 

Rationale is:
- If the property should not apply on ::first-line, it should not inherit from it. Example: border-width
- If the property does not inherit by default, like background, inheriting from ::first-line would be inconsistent because ::first-line is not always created; inherited properties do not have this problem because if they are not defined in ::first-line, they inherit from the parent containing block so only explictly author-defined declaration can change things
- Inheriting custom properties, even though they fit both previous conditions, would result in intractable problems. For instance, if the span is display:var(--my-display) and --my-display changes in the first-line, the element could disappear or become a block, and stop to be part of the first line. Just disallowing custom properties to inherit solves that problem. We could also create rules but I'd rather keep it simple.

-- 
GitHub Notification of comment by FremyCompany
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1097#issuecomment-300553985 using your GitHub account
Received on Wednesday, 10 May 2017 17:25:39 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 10:12:53 UTC