w3c / w3c/csswg-drafts

[css-media-queries] Orientation does not respect soft keyboard on mobile devices

Open
#3,587 11 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

mediaqueries-5
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

https://www.w3.org/TR/css3-mediaqueries/#orientation
https://drafts.csswg.org/mediaqueries-3/#orientation

When using @media screen and (orientation: portrait) and @media screen and (orientation: landscape) on a mobile device in portrait mode with the soft keyboard open the orientation is calculated as landscape and not portrait.

I think it would be better if orientation calculation could be based on device-height > device-width so that it would work properly in a mobile environment. If that is not possible then instead to create a device-orientation that could work off of device-height > device-width.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the CSS Media Queries orientation sections at the linked W3C and CSSWG specification URLs, then review the issue discussion for prior analysis. Determine whether orientation should ignore the soft keyboard or whether a separate device-orientation concept is needed; done means the specification direction is resolved and its behavior is defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.