Skip to content

Commit d2c4814

Browse files
committed
[css-color-adjust-1] Force opaque background if color-adjust mismatches between iframe and embedded doc. #4472
1 parent e6f9940 commit d2c4814

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

css-color-adjust-1/Overview.bs

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Preferred Color Schemes {#preferred}
7070

7171
* the initial color of the background canvas <span class=issue>find what we name this in other specs</span>,
7272
the initial value of the '/color' property,
73-
and the [[css-color-4#system-colors|system colors]]
73+
and the [[css-color-4#css-system-colors|system colors]]
7474
* the default colors of scrollbars and other interaction UI
7575
* the default colors of form controls and other "specially-rendered" elements
7676
* the default colors of other browser-provided UI, such as "spellcheck" underlines
@@ -215,16 +215,32 @@ Finding the Used Color Scheme {#color-scheme-processing}
215215
written before color scheme preferences were exposed,
216216
do not change behavior.
217217

218+
Effects of the Used Color Scheme {#color-scheme-effect}
219+
--------------------------------
220+
218221
For all elements,
219-
rendering with a color scheme should affect the colors used in all browser-provided UI for the element--
222+
rendering with a color scheme should cause the colors used in all browser-provided UI for the element--
220223
e.g. scrollbars, spellcheck underlines, form controls, etc.--
221224
to match with the intent of the color scheme.
222225

223-
For the root element of a page,
226+
On the root element,
224227
rendering with a color scheme additionally must affect the background of the canvas,
225228
the initial value of the '/color' property,
226-
and the [[css-color-4#system-colors|system colors]],
227-
and should affect the page's scrollbars.
229+
and the used values of the [[css-color-4#css-system-colors|system colors]],
230+
and should also affect the viewport's scrollbars.
231+
232+
In order to preserve expected color contrasts,
233+
in the case of embedded documents typically rendered over a transparent [=canvas=]
234+
(such as provided via an HTML <{iframe}> element),
235+
if the used 'color-scheme' of the element
236+
and the used 'color-scheme' of the embedded document’s root element
237+
do not match,
238+
then the UA must use an opaque [=canvas=] of the ''Canvas'' color
239+
appropriate to the embedded document’s 'color-scheme'
240+
instead of a transparent canvas.
241+
This rule does not apply to documents embedded
242+
via elements intended for graphics
243+
(such as <{img}> elements embedding an SVG document).
228244

229245
The "color-scheme" <{meta}> value {#color-scheme-meta}
230246
---------------------------------

0 commit comments

Comments
 (0)