Skip to content
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

Add support data for vertical form controls via writing-mode #22179

Merged
merged 10 commits into from Feb 19, 2024

Conversation

chrisdavidmills
Copy link
Collaborator

@chrisdavidmills chrisdavidmills commented Feb 6, 2024

Summary

Chrome has added support for vertical form controls; see https://developer.chrome.com/blog/vertical-form-controls for some more details. Specifically:

  • Vertical Selects/buttons released in 119
  • Vertical textareas/text-based inputs in 121
  • Vertical progress/meter/input type range in 124

Currently the latter is available in a Finch experiment, enabled 50% on Canary only. To make sure it is available on mac on Mac, you can start Canary by passing the feature:
/Applications/"Google Chrome Canary.app"/Contents/MacOS/"Google Chrome Canary" --enable-features=FormControlsVerticalWritingModeDirectionSupport

This is done by setting writing-mode to vertical-lr or vertical-rl

The blog post only talks about <input type="text">, but I also went through every other text-based input type and tested them all.

I also tested them all in Fx and Safari, and found that many of them work in those browsers too. I found it difficult to pinpoint exactly what browser versions include support for those, so:

  • I resorted to just saying true for Fx/Saf support in HTML elements
  • I filled in arbitrary values for Fx/Saf support in CSS properties, as you're not allowed to put true for CSS ;-)

Any advice on tracking down more specific values for those would be appreciated. I have already reached out to folks at Fx that I know.

Test results and supporting details

Related issues

@github-actions github-actions bot added data:css 🎨 Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS data:html 📄 Compat data for HTML elements. https://developer.mozilla.org/docs/Web/HTML data:browsers 🌍 Data about browsers (versions, release dates, etc). This data is used for validation. labels Feb 6, 2024
Copy link

github-actions bot commented Feb 6, 2024

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot added the merge conflicts 🚧 This PR needs to merge latest "main" branch to resolve a merge conflict or other issue. label Feb 6, 2024
@github-actions github-actions bot removed the merge conflicts 🚧 This PR needs to merge latest "main" branch to resolve a merge conflict or other issue. label Feb 6, 2024
@github-actions github-actions bot added the merge conflicts 🚧 This PR needs to merge latest "main" branch to resolve a merge conflict or other issue. label Feb 15, 2024
Copy link

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot removed the merge conflicts 🚧 This PR needs to merge latest "main" branch to resolve a merge conflict or other issue. label Feb 15, 2024
Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for you PR!

I wonder if it is really needed to add vertical_orientation to every element here. I think I'm leaning towards no.
What you use as a note there "Vertical orientation available via the writing-mode property (see Creating vertical controls)." is not really a compatibility note. It describes/documents that you can use the writing-mode property to do a thing. If we would document all the effects any CSS property has on HTML elements, then we would write a lot of notes on HTML element compat data... Also, the direction property apparently also controls some vertical stuff? That one you didn't mention in e.g. progress.json either...

I think on MDN there should be a note from all these elements to writing-mode (maybe in see also) to say that these can be vertical using that CSS property. The reader can then learn about writing-mode and will find the compat data on that page, too.

So, the most important part of this PR is vertical_oriented_form_controls in the writing-modes.json compat data. I made suggestions so that always includes what was already supported in earlier versions but otherwise this entry is exactly what we need here, IMO.

css/properties/writing-mode.json Outdated Show resolved Hide resolved
css/properties/writing-mode.json Outdated Show resolved Hide resolved
css/properties/writing-mode.json Outdated Show resolved Hide resolved
chrisdavidmills and others added 5 commits February 19, 2024 15:17
Co-authored-by: Florian Scholz <fs@florianscholz.com>
Co-authored-by: Florian Scholz <fs@florianscholz.com>
Co-authored-by: Florian Scholz <fs@florianscholz.com>
@chrisdavidmills
Copy link
Collaborator Author

Cheers for the review @Elchi3! Yes, I agree with you that it would be better to have this support data just on the CSS pages rather than on the pages for all HTML elements affected. I just wasn't sure of the best way to do that.

So, I've removed all the HTML page data, except for the range input data, with has some extra historical context on it beyond the writing-mode usage.

I've also made a few small updates to the writing-mode data, changing "text inputs" to "textual inputs", as all textual input types are supported, not just input type="text".

OK, now I'll get on and add those "See also" links to all the affected element pages, back over in the content PR!

Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Chris! Two more nits on the descriptions which I will apply and then merge this.

css/properties/writing-mode.json Outdated Show resolved Hide resolved
html/elements/input/range.json Outdated Show resolved Hide resolved
@Elchi3 Elchi3 merged commit 98418de into mdn:main Feb 19, 2024
6 checks passed
@chrisdavidmills chrisdavidmills deleted the vertical-controls branch February 19, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:browsers 🌍 Data about browsers (versions, release dates, etc). This data is used for validation. data:css 🎨 Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS data:html 📄 Compat data for HTML elements. https://developer.mozilla.org/docs/Web/HTML
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants