W3C home > Mailing lists > Public > public-css-archive@w3.org > April 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, 12 Apr 2017 22:40:41 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-293727678-1492036839-sysbot+gh@w3.org>
That was my expectation as well but actually it looks like not only text nodes inherit from ::first-line, but apparently any inline as well. We have special code to make this work.

You probably have a better idea of what the spec says than me, what do you think is the behavior you expect for http://wptest.center/#/sjfma2 ? 

div { 
	width: 75px; 
	--text-color: green;
div::first-line {
	--text-color: red;
	color: var(--text-color);
span {
	color: inherit;
	background: currentColor;
	outline: 3px solid var(--text-color);

Three browsers yield three different results here:

![image](https://cloud.githubusercontent.com/assets/364405/24982316/c0d58f96-1f95-11e7-9b59-663d22799e4b.png) ![image](https://cloud.githubusercontent.com/assets/364405/24982329/d5f2daaa-1f95-11e7-9585-d7542295451a.png) ![image](https://cloud.githubusercontent.com/assets/364405/24982373/f482f93c-1f95-11e7-904b-3dad8a83e8c6.png)
Edge, Chrome, Firefox

GitHub Notification of comment by FremyCompany
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1097#issuecomment-293727678 using your GitHub account
Received on Wednesday, 12 April 2017 22:40:50 UTC

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