-
Notifications
You must be signed in to change notification settings - Fork 679
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
[css-pseudo-4] Define the behavior when custom properties must be taken from the root #9279
Conversation
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.
This is my first ever spec edit. And feedback is very welcome. |
Ping! |
There was a problem hiding this 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
<h4 id="highlight-custom-properties"> | ||
Custom Properties in Highlight Styles</h3> |
There was a problem hiding this comment.
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
However, if a custom property value cannot be resolved | ||
through the highlight cascade, the property value is taken from | ||
the root element. |
There was a problem hiding this comment.
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=].
There was a problem hiding this 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. :)
Co-authored-by: fantasai <fantasai.bugs@inkedblade.net>
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. |
@fantasai I know you must be super busy, but I think this is ready to go. |
Ping! |
There was a problem hiding this 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.
[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.