Re: [csswg-drafts] [css-pseudo] Extending the scope of `::placeholder` (#13345)

Sure, the fallback text can already be styled. The pseudo-element would only be useful when that text should be styled differently than the replaced content. Since that seems rather unlikely, but not unreasonable, I thought reuse made more sense than an entirely new one. 

On a related note, [replaced elements](https://drafts.csswg.org/css-display-4/#replaced-element) do not have `::before` and `::after`, but when fallback text is shown, e.g. because fetching an external resource failed, it is not considered a replaced element anymore. Therefore this should work:

~~~~ css
img::before { 
  content: url("custom-image-instead-of-the-default-one.png"); 
}
~~~~

-- 
GitHub Notification of comment by Crissov
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13345#issuecomment-3750990894 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 14 January 2026 18:24:09 UTC