Add can-lock-orientation CSS media feature#273
Add can-lock-orientation CSS media feature#273marcoscaceres wants to merge 6 commits intogh-pagesfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new CSS media feature can-lock-orientation that enables feature detection for screen orientation locking capabilities. The addition allows developers to conditionally style or display UI elements based on whether orientation locking is available in the current context.
- Adds
can-lock-orientationmedia feature withnoneandautovalues - Includes privacy considerations to prevent fingerprinting through user preferences
- Updates the abstract to reflect the new CSS integration
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
ea01973 to
b76a334
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Why is this a media feature out of curiosity? Feels rather odd, is there any precedent for these |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| multiple screen orientations, working alongside CSS. | ||
| The API restricts locking the screen orientation | ||
| only if certain [=pre-lock conditions=] are met. | ||
| This API particularly useful for applications such as |
There was a problem hiding this comment.
Missing word "is" before "particularly useful". Should be "This API is particularly useful for applications..."
| This API particularly useful for applications such as | |
| This API is particularly useful for applications such as |
| <p> | ||
| The <a>can-lock-orientation</a> media feature can be used to test | ||
| whether the user agent supports screen orientation locking | ||
| functionality. | ||
| </p> |
There was a problem hiding this comment.
[nitpick] These lines appear redundant with the initial description at lines 917-921. The description "The can-lock-orientation media feature can be used to test whether the user agent supports screen orientation locking functionality" repeats the same information as "used to query whether the user agent supports locking the screen orientation in the current context." Consider removing this paragraph to avoid redundancy.
| <p> | |
| The <a>can-lock-orientation</a> media feature can be used to test | |
| whether the user agent supports screen orientation locking | |
| functionality. | |
| </p> |
| <ul> | ||
| <li>The user agent does not implement the Screen Orientation API | ||
| </li> | ||
| <li>The document is not [=Document/fully active=] |
There was a problem hiding this comment.
The condition "The document is not [=Document/fully active=]" is less specific than the actual check performed by the API. According to the common safety checks (line 487-490), the API checks if the document is a "fully active descendant of a top-level traversable with user attention", not just "fully active". Consider updating this to match the actual API requirement to ensure consistency and accuracy.
| <li>The document is not [=Document/fully active=] | |
| <li>The document is not a [=Document/fully active=] descendant of a top-level traversable with user attention |
| This API particularly useful for applications such as | ||
| computer games, where users physically rotate the device, but the | ||
| screen orientation itself should not change. The specification also | ||
| defines CSS media features to enable feature detection of orientation |
There was a problem hiding this comment.
[nitpick] The text uses the plural "CSS media features" but only one media feature (can-lock-orientation) is being defined in this specification. Consider using the singular "CSS media feature" for accuracy, or if multiple features are planned, this is fine as is.
| defines CSS media features to enable feature detection of orientation | |
| defines a CSS media feature to enable feature detection of orientation |
Closes #206
The following tasks have been completed:
Implementation commitment:
Preview | Diff