Re: [webkit-dev] Request for position: CSS spelling and grammar features

2021-07-01 Thread Delan Azabani via webkit-dev
On 2021-01-06 10:45, dazabani wrote:
> I’m seeking WebKit’s position on the following features in css-pseudo
> and css-text-decor:

Just following up on this. Any thoughts?

See also my request for position regarding CSS highlight inheritance:
https://lists.webkit.org/pipermail/webkit-dev/2021-January/031660.html
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


[webkit-dev] Request for position: CSS highlight inheritance (css-pseudo #highlight-cascade)

2021-07-01 Thread Delan Azabani via webkit-dev
I’m seeking WebKit’s position on the “Cascading and Per-Element
Highlight Styles” section of css-pseudo-4 [0].

Most impls (with the sole exception of Presto) have historically not
propagated highlight styles through the element tree. This has meant
that only the global ::selection selector (*::selection) worked
intuitively, and made it awkward to style the highlights on some
subset of elements.

Authors had to repeat each selector with a “*” descendant, and ensure
that “overriding” rules win the cascade. For example, to highlight
content under p.foo in yellow, but content under  anywhere in the
document in cyan, one might:

p.foo::selection,
p.foo *::selection {
background-color: yellow;
}
em:not(#specificity)::selection,
em:not(#specificity) *::selection {
background-color: cyan;
}

The spec gives highlights an inheritance-based processing model, where
all properties (inherited or otherwise) default to the value on the
parent’s highlight. Note that the spec’s processing model is no longer
cascade-based, as of w3c/csswg-drafts#2474 [1].

We believe the compat risk is minimal, because the new model won’t
break existing content with global ::selection rules, nor will it
break rules that use the cascade to build an ersatz “propagation” like
the example above. As far as we can tell, only content that relies on
descendants of a highlight-styled element being reset to initial
styles should be affected.

[0] https://drafts.csswg.org/css-pseudo-4/#highlight-cascade
[1] https://github.com/w3c/csswg-drafts/issues/2474

Cheers,
Delan Azabani
Igalia // web platform
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev