-
Notifications
You must be signed in to change notification settings - Fork 689
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] Add discussion of properties from the originating element #9428
Conversation
Spec issue: w3c#7591 Per resolution, properties not allowed on highlights but otherwise required to resolve units or modify colors are instead taken from the originating element.
Ping! |
Alright, question I'm not entirely clear on: what is the result of getComputedStyle() for
? |
Sorry I missed this way back. In any event. getComputedStyle in Chrome reports the originating element's font size because the font size in the selection pseudo is never applied and the font size is set from the originating element always. <style> p { font-size: 20px; border-width: 10px; border-style: solid; border-color: green;} p::selection { font-size: 30px; border-width: 20px; border-style: solid; border-color: green;} </style>Hello world getComputedStyle(x, ":selection").fontSize
The border properties are defaults, e.g. borderTopWidth > 0px. |
The CSS working group resolved that custom property values should come from the originating element, and here I update the spec.
I'd like to finally land this. I added the update for the custom property resolution. |
I think this text needs tweaking, since the language is a bit imprecise; but I think it'll be easier to tweak after merging so accepting it as-is for now. |
Spec issue: #7591
Per resolution, properties not allowed on highlights but otherwise required to resolve units or modify colors are instead taken from the originating element.