Skip to content

[css-writing-modes] writing-mode on form control elements #8633

@josepharhar

Description

@josepharhar

The spec says that 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": openui/open-ui#600 (comment)

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    css-writing-modes-3css-writing-modes-4Current Worki18n-trackerGroup bringing to attention of Internationalization, or tracked by i18n but not needing response.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions