You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per https://www.w3.org/TR/css-color-adjust-1/#forced-colors-properties, forced-color adjustment changes used values, not computed values (unless inherited with forced-color-adjust: preserve-parent-color). Therefore, the computed values follow normal rules. The computed background-color of html, body are transparent, red. Moreover, the computed background-image of html, body are both none. According to the adjustment rules, the used background of body is Canvas in this case.
Per https://drafts.csswg.org/css-backgrounds/#body-background, when the computed background-color, background-image of html are transparent, none, the computed background properties of body are propagated to html (as if they were "specified"), and the used background of body is initial value, which is transparent. Note that the propagated specified values to html become computed values.
We reach a contradiction on the used background of body. The order of propagation and adjustment should be specified.
In addition, regardless of the used background on body:
The computed background of html becomes red, and its forced-color-adjust is none, so it should be red.
However, MSEdge 136.0.3240.50 (Official build) (64-bit) will show Canvas background. Would you suggest that I file an issue with Chromium? (I don't suggest myself reporting that as a bug.)
I feel the correct definition should be this:
The background on body is computed, then potentially adjusted, arriving at a used value.
If the computed background on html is transparent, then it acquires the used background from body (not the computed of body) as its own computed value and forcibly resets body to transparent background. Potentially, the background of html undergoes adjustment from its computed value (either propagated or cascaded).
I'll call the propagation condition "html has trivial background". Enumerate the scenarios for my proposed definition:
html has trivial background, either or both have adjustment, then the overall result is Canvas background.
html has trivial background, neither has adjustment, then the overall result is developer-specified background from body.
html has non-trivial background, then the canvas background directly determined by html (considering html willingness to adjust).
In all cases, the result is intuitive (and consistent with what MSEdge currently does).
Note that in the proposed definition, in the second step, whether the forcible reset of body to transparent is followed by another potential adjustment on body, is academic and not interesting:
Per CSS color-adjust-1, upon adjustment, the background color retains its alpha channel. Therefore, the body background simply becomes another transparent color. There is no difference in rendered result.
Keeping body simply transparent reenforces the (correct) idea that setting onebackground on either html or body simply sets the canvas background. The range of this background has nothing to do with the bounds of html or body.
The text was updated successfully, but these errors were encountered:
Consider:
Suppose
red
is not a system color, then:forced-color-adjust: preserve-parent-color
). Therefore, the computed values follow normal rules. The computedbackground-color
ofhtml
,body
aretransparent
,red
. Moreover, the computedbackground-image
ofhtml
,body
are bothnone
. According to the adjustment rules, the used background ofbody
isCanvas
in this case.background-color
,background-image
ofhtml
aretransparent
,none
, the computed background properties ofbody
are propagated tohtml
(as if they were "specified"), and the used background ofbody
is initial value, which istransparent
. Note that the propagated specified values tohtml
become computed values.We reach a contradiction on the used background of
body
. The order of propagation and adjustment should be specified.In addition, regardless of the used background on
body
:html
becomesred
, and itsforced-color-adjust
isnone
, so it should be red.However, MSEdge 136.0.3240.50 (Official build) (64-bit) will show
Canvas
background. Would you suggest that I file an issue with Chromium? (I don't suggest myself reporting that as a bug.)I feel the correct definition should be this:
body
is computed, then potentially adjusted, arriving at a used value.html
istransparent
, then it acquires the used background frombody
(not the computed ofbody
) as its own computed value and forcibly resetsbody
totransparent
background. Potentially, the background ofhtml
undergoes adjustment from its computed value (either propagated or cascaded).I'll call the propagation condition "
html
has trivialbackground
". Enumerate the scenarios for my proposed definition:html
has trivialbackground
, either or both have adjustment, then the overall result isCanvas
background.html
has trivialbackground
, neither has adjustment, then the overall result is developer-specified background frombody
.html
has non-trivialbackground
, then the canvas background directly determined byhtml
(consideringhtml
willingness to adjust).In all cases, the result is intuitive (and consistent with what MSEdge currently does).
Note that in the proposed definition, in the second step, whether the forcible reset of
body
totransparent
is followed by another potential adjustment onbody
, is academic and not interesting:body
simplytransparent
reenforces the (correct) idea that setting onebackground
on eitherhtml
orbody
simply sets the canvas background. The range of this background has nothing to do with the bounds ofhtml
orbody
.The text was updated successfully, but these errors were encountered: