Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-pseudo-4] Define the behavior when custom properties must be taken from the root #9279

Merged
merged 9 commits into from
Nov 20, 2023

Conversation

schenney-chromium
Copy link
Contributor

[css-pseudo-4] Define the behavior when custom properties must be taken from the root

In #6641 it was resolved that "highlight pseudos inherit across the highlight tree, and the root highlight inherits custom props from the root element". Here we add spec language to explain the behavior, with an example.

A WPT will be added when the chromium change that implements the behavior is landed.

In w3c#6641 it was resolved that "highlight pseudos inherit across the highlight tree, and the root highlight inherits custom props from the root element". Here we add spec language to explain the behavior.
@schenney-chromium schenney-chromium self-assigned this Aug 31, 2023
@schenney-chromium schenney-chromium added the css-pseudo-4 Current Work label Aug 31, 2023
@schenney-chromium schenney-chromium marked this pull request as ready for review August 31, 2023 01:09
@schenney-chromium
Copy link
Contributor Author

This is my first ever spec edit. And feedback is very welcome.

@schenney-chromium
Copy link
Contributor Author

Ping!

@astearns astearns self-requested a review September 12, 2023 07:51
Copy link
Member

@astearns astearns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

css-pseudo-4/Overview.bs Outdated Show resolved Hide resolved
Comment on lines 939 to 940
<h4 id="highlight-custom-properties">
Custom Properties in Highlight Styles</h3>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would merge this section with 3.5. Cascading and Per-Element Highlight Styles

css-pseudo-4/Overview.bs Outdated Show resolved Hide resolved
Comment on lines 944 to 946
However, if a custom property value cannot be resolved
through the highlight cascade, the property value is taken from
the root element.
Copy link
Collaborator

@fantasai fantasai Sep 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of adding this sentence, I would take this existing sentence:

Additionally, for highlight pseudo-elements originating from the root element, the inherited value of color is currentColor, not the initial value.

Split it out into a list item like this:

Additionally, for [=highlight pseudo-elements=] originating from the [=root element=]:

  • the inherited value of 'color' is ''currentColor'', not the [=initial value=].
  • [=custom properties=] inherit from the [=root element=].

Copy link
Collaborator

@fantasai fantasai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Here's comments. :)

css-pseudo-4/Overview.bs Outdated Show resolved Hide resolved
schenney-chromium and others added 2 commits September 12, 2023 20:03
Co-authored-by: fantasai <fantasai.bugs@inkedblade.net>
@schenney-chromium
Copy link
Contributor Author

OK. I fixed a couple of typos and made the latest requested change. Thanks again.

Next up, in another PR, will be the changes about font properties from the originating element.

@schenney-chromium
Copy link
Contributor Author

@fantasai I know you must be super busy, but I think this is ready to go.

@schenney-chromium
Copy link
Contributor Author

Ping!

Copy link
Collaborator

@fantasai fantasai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks a lot!

p.s. I am nearly impossible to reach through GH notifications (someday, it's my dream, I will figure this out, but it hasn't happened yet), but don't be shy about emailing me.

@fantasai fantasai merged commit c6ff643 into w3c:main Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-pseudo-4 Current Work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants