In the section https://drafts.csswg.org/css-pseudo-4/#highlight-styling, it lists a few CSS properties that are allowed to style highlights pseudo-elements, such as color, background-color. Also, it briefly mentions why only certain properties are allowed:
that do not affect layout and can be applied performantly in a highly dynamic environment
I suggest to add user-select to the list of applicable properties. With the advent of custom highlights of css-highlight-api-1 spec, it would allow use-cases such as making only a dynamically assigned portion a body of text selectable. The user-select property does not affect layout, and would be a good match with the highlight API for developers who want fine-grained control over how texts are highlighted.
That seems doable, but I am not sure I understand why it is desirable. Can you give more examples of why you would selectively turn on of off part of the page based on highlights pseudos?
In the section https://drafts.csswg.org/css-pseudo-4/#highlight-styling, it lists a few CSS properties that are allowed to style highlights pseudo-elements, such as
color
,background-color
. Also, it briefly mentions why only certain properties are allowed:I suggest to add
user-select
to the list of applicable properties. With the advent of custom highlights ofcss-highlight-api-1
spec, it would allow use-cases such as making only a dynamically assigned portion a body of text selectable. Theuser-select
property does not affect layout, and would be a good match with the highlight API for developers who want fine-grained control over how texts are highlighted.