-
Notifications
You must be signed in to change notification settings - Fork 722
[css-text-decor] Add some sort of z-index value to text-decoration #6235
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
Comments
[css-text-decoration-4]
Painting order is in the spec: https://drafts.csswg.org/css-text-decor-4/#painting-order, and line-through is supposed to be in front of the text, underline/overline behind. How well that's implemented, I couldn't say. |
In that case I would like to propose to give authors the option to choose whether the line should be in front or behind the text. Placing a line with a thickness of 1em or more behind the text with |
You can achieve that effect in the current spec by using |
Oh nice! I didn’t know |
Why would you need to control stacking order for underline + overline? Are you planning on stacking the two atop each other? I suspect that's far enough outside the intended usage of under/overlines that we probably don't want to try and solve it.
The text-decoration properties aren't list-valued in general; the properties apply to all the text decorations generated by the element, and you just specify which lines get drawn in that fashion. |
I would like to be able to set a 1em thick dotted |
Ah, for that sort of case you're going to need to use multiple wrappers anyway, since the styles like colors apply to all the decorations generated by an element. We can't change that without a fairly significant overhaul of the entire feature. |
I understand that in the current spec this is how things work. From the point of view of someone who uses CSS as an artistic material I think it would be worth the effort to make it more flexible. Maybe add a label |
Recently I played around with some new text-decoration properties like
text-decoration-thickness
. I noticed that you cannot control whether the line is placed on top of the text, or behind the text. This is relevant with larger values fortext-decoration-thickness
, like1em
in combination withtext-decoration-line
values ofline-through
andoverline
.I made an example that illustrates the issue.
In this example, in the second and third paragraphs the text-decorations are placed on top of the text, which makes it unreadable. A property to place these text-decorations behind the text would open up a new trove of creative possibilities.
I couldn’t find any reference to this problem in the spec, or in the github issues, hence this issue.
The text was updated successfully, but these errors were encountered: