[csswg-drafts] [css-writing-modes] writing-mode on form control elements (#8633)

josepharhar has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-writing-modes] writing-mode on form control elements ==
The [spec says that](https://drafts.csswg.org/css-writing-modes-3/#:~:text=However%20embedded%20replaced%20content%20involving%20text%20(such%20as%20MathML%20content%20or%20form%20elements)%20should%20match%20the%20replaced%20element%E2%80%99s%20writing%20mode%20and%20line%20orientation%20if%20the%20UA%20supports%20such%20a%20vertical%20writing%20mode%20for%20the%20replaced%20content) user agents "should" instead of "must" respect writing mode in replaced elements. I suppose this makes sense for native form control picker popups that don't support being rotated for writing mode on some native platforms.

However, there are parts of the controls that the user agent can control because they are actually rendered inside the page and don't use native platform code to render, such as the button to open a picker for various input types, the `<button>` element, the `<textarea>` element, etc.

There are also several WPTs which have been included in interop2023 to test this behavior (for the part rendered inside the page), but they all have optional in their name (which seems like a contradiction to me), and I'm guessing it's because the spec says "should" instead of "must": https://wpt.fyi/results/css/css-writing-modes/forms?label=master&label=experimental&product=chrome&product=firefox&product=safari&aligned&view=interop&q=label%3Ainterop-2022-forms%20or%20label%3Ainterop-2023-forms
cc @nt1m who has worked on these tests

I don't know about the other browsers, but in chromium we even have a user agent stylesheet rule to disable writing-mode for certain form control elements and I don't know why we have it: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/resources/html.css;l=410-413;drc=5fa2480334f68dbe19ee6591cba86dde6bb25603

In discussions for the new `<selectmenu>` element, this was also raised as an issue with interest in changing the "should" to a "must": https://github.com/openui/open-ui/issues/600#issuecomment-1231181295

Should the spec say "must" instead of "should"?
Should user-agent stylesheets disable writing-mode on form control elements like chromium is doing or not?

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


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

Received on Wednesday, 22 March 2023 18:42:52 UTC