W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2021

Re: [csswg-drafts] [css-flexbox][css-pseudo] placeholder pseudo-element fails to be flex item (#6536)

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Fri, 27 Aug 2021 17:28:49 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-907359560-1630085327-sysbot+gh@w3.org>
> but it is nowhere elaborated, what this "limited in its abilities" means. It seems like a waver that could be translated to "Dear Mr. Browser, do whatever the hell you want!".

That phrase only appears in a note explaining the feature; it's not normative text anyway. The elaboration you're looking for is in the very next sentence following the note:

> All properties that apply to the ::first-line pseudo-element also apply to the ::placeholder pseudo-element.

Like ::first-line, ::placeholder only styles the placeholder text itself; it can't style the text's surrounding box, because the interior of an input is hidden from CSS. This means layout properties like Flexbox can't be applied to it, just text styling like color or alignment.

Making the ::placeholder capable of taking all properties, like ::before does, would require us to specify precisely what the interior layout structure of an `input` is, and CSS has traditionally purposely avoided that, to allow UAs flexibility in how they implement and display form elements to the user.

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

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 27 August 2021 17:28:50 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:43 UTC