-
Notifications
You must be signed in to change notification settings - Fork 671
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] highlight pseudos and emphasis/underline properties #7101
Comments
There's also Doing some tests, Chrome and WebKit allows you to change However only Chrome allows to change |
@mrego not sure about emphasis marks, but note that ‘text-decoration-color’ on ::selection is only for decorations added by ::selection, and originating decorations are recolored to ‘color’ (test, ref). Blink is incorrect to allow the property to change the color of originating decorations, and Firefox doesn’t yet support highlight decorations at all. |
Clarifying that text-underline* applies is good, and adding |
Yeah I agree with @fantasai. I don't think |
Makes sense! I’ve updated #7222, pending discussion in the meeting. |
The CSS Working Group just discussed
The full IRC log of that discussion<emeyer> Topic: [css-pseudo] highlight pseudos and emphasis/underline properties<emeyer> Github: https://github.com//issues/7101 <emeyer> delan: Highlight pseudos have a restricted subset of applicable properties. Not all properties in the text-decoration spec start with text-decoration-*. Question originally was, can we add those and make them applicable. I initially thought we should. fantasai and rego have mentioned most of the text-emphasis-* properties shouldn’t be applicable. <emeyer> …Maybe only text-emphasis-color should be applied. That’s where we are now. <emeyer> astearns: I’m a little worried that the proposed patch is still a little vague. Should we be very specific about what can be applied? <emeyer> fantasai: I don’t think we should be very specific, because as more things are added elsewhere, user agents should be free to add them here. I think the proposed wording is good enough for now. <tantek> +1 fantasai <smfr> q+ <emeyer> delan: In general, we’re happy with all the properties related to line decorations being applicable? <emeyer> fantasai: Right. <emeyer> delan: So it’s the emphasis marks that are contentious. <astearns> ack smfr <emeyer> smfr: Are we avoiding properties that can cause ink or layout overflow? <emeyer> delan: Ink overflow yes, layout overflow no. <emeyer> fantasai: Ink overflow doesn’t trigger scrollbars. We want to avoid anything that could cause scrollbars. <emeyer> delan: So actually ink overflow no, layout overflow yes. Sorry, got those backwards. <emeyer> astearns: Ink overflow is okay, layout overflow is not okay. We could have a note in the specification saying that’s how we determine the list of properties. <emeyer> delan: We sort of do say that about the layout, but we could be more explicit about ink overflow. <iank_> changes in layout overflow implicitly effects layout. <emeyer> astearns: The bit we have about not affecting overflow layout is sufficient, I think. <emeyer> RESOLVED: Accept the proposed PR <fantasai> fwiw fwiw spec says “The highlight pseudo-elements can only be styled by a limited set of properties that do not affect layout and can be applied performantly in a highly dynamic environment—and additionally (to ensure interoperability) whose rendering within the required area is not dependent on the exact (UA-determined) bounds of the highlight overlay.” |
Hmm… #highlight-text says:
So if originating emphasis marks are recolored to the highlight ‘color’ just like line decorations, rather than using the highlight ‘text-emphasis-color’, and highlights can’t add their own emphasis marks with ‘text-emphasis-style’, then actually I think there’s no need for ‘text-emphasis-color’ on highlights. @fantasai, what do you think? |
@delan Allowing |
@fantasai how would it affect originating emphasis marks, given the following?
I also think originating emphasis marks get painted not because the highlight inherits ‘text-emphasis-style’, but because we say so in #highlight-painting. ‘text-emphasis-color’ has no effect when ‘text-emphasis-style’ is ‘none’, so by analogy, if we want it to have an effect when ‘text-emphasis-style’ is not applicable, we should probably say so explicitly. |
@delan We'd have to spec it so that the highlight's The question is whether this is worth doing now, or just always using |
Yeah, that makes sense. I think we should ignore ‘text-emphasis-color’ for now, or even remove it from the list until we decide to spec that behaviour. I’ve updated #7222 to remove it, but let me know if we should leave it in and somehow say it’s ignored. |
https://drafts.csswg.org/css-pseudo-4/#highlight-styling
The current spec text could be interpreted as only allowing ‘text-decoration’ and ‘text-decoration-*’ and ‘text-shadow’, which would include line decorations and text shadows, but not emphasis marks or ‘text-underline-position’ or ‘text-underline-offset’. Should we somehow allow those properties more explicitly?
(@fantasai, @frivoal, @mrego)
The text was updated successfully, but these errors were encountered: