Re: [csswg-drafts] [Cascade / Pseudo-elements / Values / Fragmentation] currentColor when fragments have differents colors (#1510)

We added the following paragraph to css-cascade-5:
> Certain CSS features can interfere with value processing on a per-fragment basis. See for example “CSS Pseudo-Elements 4 §2.1.3 Inheritance and the ::first-line Pseudo-element” which alters inheritance for fragments within the ::first-line pseudo-element. In such cases, where individual fragments are given different specified values, any values that resolve based on the computed value of other properties (such as currentcolor or em units) are resolved per box fragment. Subsequent value processing proceeds as normal in each fragment.

We also noticed that we now have not good answer to what APIs like ''getComputedStyle()'' should return. Based on Firefox’s handling of the [testcase](https://jsfiddle.net/g5c0o2xp/), we're recommending to spec the following:

> APIs that assume a singular value per box (rather than per box fragment) must ignore the effects of non-tree-abiding pseudo-elements. (For example, ::first-line styles have no effect on the value returned by getComputedStyle().)

Agenda+ to confirm with the CSSWG.


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


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

Received on Saturday, 20 March 2021 00:14:36 UTC