-
Notifications
You must be signed in to change notification settings - Fork 18
Add can-lock-orientation CSS media feature #273
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
base: gh-pages
Are you sure you want to change the base?
Changes from 5 commits
799be6d
b76a334
82353cc
b4e9430
3208037
45b5ee3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -51,7 +51,9 @@ | |||||||||||
| allows for the screen orientation to be locked under certain | ||||||||||||
| preconditions. This is particularly useful for applications such as | ||||||||||||
| computer games, where users physically rotate the device, but the | ||||||||||||
| screen orientation itself should not change. | ||||||||||||
| screen orientation itself should not change. The specification also | ||||||||||||
| defines CSS media features to enable feature detection of orientation | ||||||||||||
| locking capabilities. | ||||||||||||
| </p> | ||||||||||||
| </section> | ||||||||||||
| <section id="sotd"> | ||||||||||||
|
|
@@ -888,6 +890,137 @@ <h2> | |||||||||||
| condition=]. | ||||||||||||
| </p> | ||||||||||||
| </section> | ||||||||||||
| <section data-cite="mediaqueries-5"> | ||||||||||||
| <h2> | ||||||||||||
| CSS Integration | ||||||||||||
| </h2> | ||||||||||||
| <section> | ||||||||||||
| <h2> | ||||||||||||
| The `can-lock-orientation` media feature | ||||||||||||
| </h2> | ||||||||||||
| <p> | ||||||||||||
| The <code><dfn>can-lock-orientation</dfn></code> media feature is | ||||||||||||
| used to query whether the user agent supports locking the screen | ||||||||||||
| orientation in the current context. | ||||||||||||
| </p> | ||||||||||||
| <p> | ||||||||||||
| <strong>Value:</strong> <code>none</code> | <code>auto</code> | ||||||||||||
| </p> | ||||||||||||
| <p> | ||||||||||||
| The <a>can-lock-orientation</a> media feature can be used to test | ||||||||||||
| whether the user agent supports screen orientation locking | ||||||||||||
| functionality. | ||||||||||||
| </p> | ||||||||||||
|
Comment on lines
+925
to
+929
|
||||||||||||
| <p> | |
| The <a>can-lock-orientation</a> media feature can be used to test | |
| whether the user agent supports screen orientation locking | |
| functionality. | |
| </p> |
Copilot
AI
Nov 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[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.