You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The placeholder code works by providing layout with the placeholder text content when layout asks for it, then layout styles it like non-placeholder content:
placeholder seems to be hardcoded to be gray now, but the problem still persists, as proven by running the test case which should dye it blue instead. Tested on Arch Linux x86_64, servo built against commit id 9d29017, compared against Firefox 141.0, Epiphany 48.5 and Chromium 138.0.7204.168 (ordered left to right).
Activity
tigercosmos commentedon Nov 28, 2017
Where is the suspected code that can fix this? CSS read
color?emilio commentedon Nov 28, 2017
That's the input
placeholder.tigercosmos commentedon Nov 28, 2017
Are there any code that dealing with color of placeholder?
jdm commentedon Nov 28, 2017
The placeholder code works by providing layout with the placeholder text content when layout asks for it, then layout styles it like non-placeholder content:
servo/components/script/dom/htmltextareaelement.rs
Line 67 in 3f0ccd0
servo/components/script/dom/node.rs
Line 1142 in 976f9e3
servo/components/layout/construct.rs
Line 680 in fe4139b
servo/components/layout/construct.rs
Line 680 in fe4139b
ferjm commentedon Jan 18, 2018
I think there are a couple of issues here:
::placeholderpseudo-element.With a reduced test case like:
the layout is different in Gecko (left) and Servo (right):
ferjm commentedon Jan 18, 2018
Actually, it seems that at least Stylo supports it, but it does not seem to be working properly. I'll investigate more.
ferjm commentedon Jan 18, 2018
Apparently there's support for Gecko, but not for Servo, so I opened #19808
pwnorbitals commentedon Nov 14, 2020
Is this still reproducible lately ?
atouchet commentedon Nov 14, 2020
Yes. The text is the search box is still white instead of grey.
lumiscosity commentedon Jul 26, 2025
placeholderseems to be hardcoded to be gray now, but the problem still persists, as proven by running the test case which should dye it blue instead. Tested on Arch Linux x86_64, servo built against commit id 9d29017, compared against Firefox 141.0, Epiphany 48.5 and Chromium 138.0.7204.168 (ordered left to right).lumiscosity commentedon May 17, 2026
::placeholderis here 🎉Tested on Arch Linux x86_64, Servo built against commit 6c2ac81, Firefox 150.0.3.