fune/layout/reftests/css-placeholder/css-restrictions.html
Emilio Cobos Álvarez a2118a17fe Bug 1732267 - Make textarea::placeholder honor white-space. r=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 https://github.com/w3c/csswg-drafts/issues/6669 for the discussion
that prompted this.

Differential Revision: https://phabricator.services.mozilla.com/D126471
2021-09-24 05:45:33 +00:00

23 lines
596 B
HTML

<!DOCTYPE html>
<html>
<style>
:is(input, textarea)::placeholder {
visibility: hidden;
padding: 20px;
float: right;
overflow: visible;
/*
* This list could be endless given that all non-whitelisted properties
* are restricted.
*/
}
</style>
<body>
<input placeholder='foo'>
<textarea placeholder='foo'></textarea>
<!-- for overflow and white-space -->
<input placeholder='this is a quitelongetextforasmallelement'>
<textarea placeholder='this is a quitelongetextforasmallelement'></textarea>
</body>
</html>