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

[csswg-drafts] [css-text-3] whitespace inside text areas (#6309)

From: Aleksandar Totic via GitHub <sysbot+gh@w3.org>
Date: Mon, 24 May 2021 23:58:09 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-900112573-1621900688-sysbot+gh@w3.org>
atotic has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-text-3] whitespace inside text areas ==
Inside `<textarea>`, browsers handle `whitespace:normal` differently:

Chrome silently replaces `normal` with `pre-wrap`. Edge used to do this too.
FF/Safari keep `normal` as is.

Having `normal` whitespace causes a non-WYSIWYG editing experience for the user. Spaces are not displayed as users type them, but they remain in DOM.

My opinion is that Chrome's behavior is desirable, because typing spaces and seeing nothing happen would be very confusing for the user, and the backend that receives a form with random white spacing that "looks good in the browser".

Does csswg have an opinion on what the right thing to do is?

[Center and right justified text in textarea is not visually aligned properly.
[Can't enter leading/trailing spaces in TEXTAREA with white-space:normal or nowrap](https://bugs.chromium.org/p/chromium/issues/detail?id=595491)

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6309 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 24 May 2021 23:58:11 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:27:23 UTC