-
Notifications
You must be signed in to change notification settings - Fork 716
[css-selectors-4] [css-pseudo-elements-4] ::placeholder and :placeholder-shown should explicitly apply to textarea elements #6669
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
It seems that was done because of implementation issues, so I don't think it should matter anymore, I'll try to lift this restriction. |
…reviewers,jfkthame This comes from https://hg.mozilla.org/mozilla-central/rev/0f28fd24bdf3, and was done because of implementation limitations which don't apply anymore (https://bugzilla.mozilla.org/show_bug.cgi?id=737786#c33): * white-space changes don't reframe anymore, they only reflow. * We fixed reframing of native-anonymous content to do the right thing. This aligns <textarea> and <input>, so I think it should be uncontroversial. See w3c/csswg-drafts#6669 for the discussion that prompted this. Differential Revision: https://phabricator.services.mozilla.com/D126471
This comes from https://hg.mozilla.org/mozilla-central/rev/0f28fd24bdf3, and was done because of implementation limitations which don't apply anymore (https://bugzilla.mozilla.org/show_bug.cgi?id=737786#c33): * white-space changes don't reframe anymore, they only reflow. * We fixed reframing of native-anonymous content to do the right thing. This aligns <textarea> and <input>, so I think it should be uncontroversial. See w3c/csswg-drafts#6669 for the discussion that prompted this. Differential Revision: https://phabricator.services.mozilla.com/D126471 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1732267 gecko-commit: 64bfebfc3f6c63388d8a27b2a0c91020dc859666 gecko-reviewers: layout-reviewers, jfkthame
This comes from https://hg.mozilla.org/mozilla-central/rev/0f28fd24bdf3, and was done because of implementation limitations which don't apply anymore (https://bugzilla.mozilla.org/show_bug.cgi?id=737786#c33): * white-space changes don't reframe anymore, they only reflow. * We fixed reframing of native-anonymous content to do the right thing. This aligns <textarea> and <input>, so I think it should be uncontroversial. See w3c/csswg-drafts#6669 for the discussion that prompted this. Differential Revision: https://phabricator.services.mozilla.com/D126471 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1732267 gecko-commit: 64bfebfc3f6c63388d8a27b2a0c91020dc859666 gecko-reviewers: layout-reviewers, jfkthame
…reviewers,jfkthame This comes from https://hg.mozilla.org/mozilla-central/rev/0f28fd24bdf3, and was done because of implementation limitations which don't apply anymore (https://bugzilla.mozilla.org/show_bug.cgi?id=737786#c33): * white-space changes don't reframe anymore, they only reflow. * We fixed reframing of native-anonymous content to do the right thing. This aligns <textarea> and <input>, so I think it should be uncontroversial. See w3c/csswg-drafts#6669 for the discussion that prompted this. Differential Revision: https://phabricator.services.mozilla.com/D126471
This comes from https://hg.mozilla.org/mozilla-central/rev/0f28fd24bdf3, and was done because of implementation limitations which don't apply anymore (https://bugzilla.mozilla.org/show_bug.cgi?id=737786#c33): * white-space changes don't reframe anymore, they only reflow. * We fixed reframing of native-anonymous content to do the right thing. This aligns <textarea> and <input>, so I think it should be uncontroversial. See w3c/csswg-drafts#6669 for the discussion that prompted this. Differential Revision: https://phabricator.services.mozilla.com/D126471 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1732267 gecko-commit: 64bfebfc3f6c63388d8a27b2a0c91020dc859666 gecko-reviewers: layout-reviewers, jfkthame
@astearns I don't think the CSS specs need any edits here, so let me know if we can close out this issue! |
@fantasai I do not think it is clear in the CSS specs that these both have effects on textarea elements as well as input elements. I’d like both sections to at least mention the textarea element. |
@astearns I've added TEXTAREA to the example in Selectors 4 and copied it over into the Pseudo-Elements spec as well. Is this enough to close the issue? |
Yes. Thanks! |
The MDN documentation for ::placeholder and :placeholder-shown mention that they apply to textarea and input elements:
https://developer.mozilla.org/en-US/docs/Web/CSS/::placeholder
https://developer.mozilla.org/en-US/docs/Web/CSS/:placeholder-shown
The textarea element is not mentioned in either spec section for these:
https://drafts.csswg.org/css-pseudo/#placeholder-pseudo
https://drafts.csswg.org/selectors/#placeholder
As far as implementations go, ::placeholder appears to work with textareas, but :placeholder-shown has issues.
https://codepen.io/astearns/pen/zYzLaOL
In Mac Firefox, it looks like :placeholder-shown on textareas allows the same properties as ::placeholder (those limited to ::first-line), so you can’t do things like truncate the placeholder text with an ellipsis. In Chrome and Safari, it does not appear to work with textareas at all.
I suggest that we specify what MDN documents (both ::placeholder and :placeholder-shown should work with textarea). This would be specifying reality with regard to ::placeholder, and if that’s acceptable then :placeholder-shown should match.
The text was updated successfully, but these errors were encountered: