abspos placeholder between adjacent inline elements prevents `text-transform:capitalize` from working on the second one
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
People
(Reporter: chris, Assigned: jfkthame)
References
(Regression)
Details
(Keywords: regression)
Attachments
(4 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/113.0
Firefox for Android
Steps to reproduce:
Create a list of links:
<a href="#">about</a>
<a href="#">blogs</a>
<a href="#">contact</a>
Apply text-transform: capitalize:
a{
text-transform: capitalize;
position: relative;
}
Add a pseudo-element "::after":
a::after{
content: "";
position: absolute;
inset: 0;
outline:1px dashed red;
}
Note - this only happens on the "after" pseudo-element. When using "before" the capitalisation occurs correctly.
Actual results:
Only the first anchor text got the capitalization.
All other links remained in lower case
Expected results:
The first letter of each word should be capitalized
Comment 1•2 years ago
|
||
Setting this issue to Core > CSS Parsing and Computation component, to allow our engineers to take a closer look at it. If this is not the right component, please assign a more appropriate one. Thanks!
Comment 2•2 years ago
|
||
Thanks for the bug report! I can reproduce. Here's a testcase, not using ::after but instead just using an actual element in place of the pseudo-element that ::after generates. So: this isn't specific to pseudo-elements. It seems to be related to the absence of whitespace, too, as shown when comparing the upper vs. lower half of this testcase.
It looks like when we've got two inline elements side by side, we treat each one as being a capitalizeable word. But when we've got an abspos element spliced between them with no whitespace, then we treat the second one as if it weren't a new word.
Updated•2 years ago
|
Comment 3•2 years ago
|
||
This seems to be a regression, though it's an old one.
Regression range:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=257f2c96cef502a1d674df56c8e39d76d8ed4d89&tochange=aaae630f30291056f4f40bbd9e12a917309e401e
Looks like a regression from bug 1418472. jfkthame, maybe you could take a look?
Updated•2 years ago
|
Comment 4•2 years ago
|
||
Set release status flags based on info from the regressing bug 1418472
| Assignee | ||
Comment 5•2 years ago
|
||
The issue here was that the 8-bit version of AppendText failed to reset the flag on space.
Where text-transform:capitalize is applied to a multi-word chunk of text, this wasn't an issue
because AppendText delegates to the more comprehensive 16-bit version whenever capitalization
is requested, so only that version cares about the word-continuation flag.
However, in this case the whitespace between the spans does not itself have the capitalization
property set, and so it doesn't go via the 16-bit function, and we failed to clear the flag.
Updated•2 years ago
|
| Assignee | ||
Comment 6•2 years ago
|
||
No functional change, just cleaning up minor code formatting issues I noticed while reading this file.
Depends on D183251
| Assignee | ||
Comment 7•2 years ago
|
||
Depends on D183252
Updated•2 years ago
|
Comment 10•2 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/9733569bfd85
https://hg.mozilla.org/mozilla-central/rev/a7a9a2467492
https://hg.mozilla.org/mozilla-central/rev/e3c9958afc20
| Assignee | ||
Updated•2 years ago
|
Description
•