-
Notifications
You must be signed in to change notification settings - Fork 29
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?
Conversation
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.
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.
index.html
Outdated
| The `can-lock-orientation` media feature is a <a data-cite="mediaqueries-5#boolean-context">boolean context</a> | ||
| media feature. It can be used to test whether the user agent supports |
Copilot
AI
Oct 17, 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 feature is described as a boolean context media feature, but it explicitly defines two discrete values (none and auto). Boolean context media features typically don't have explicit values. Consider either removing the explicit values and using standard boolean syntax, or clarifying that this is a discrete media feature with two possible values rather than a boolean context feature.
| The `can-lock-orientation` media feature is a <a data-cite="mediaqueries-5#boolean-context">boolean context</a> | |
| media feature. It can be used to test whether the user agent supports | |
| The `can-lock-orientation` media feature is a <a data-cite="mediaqueries-5#discrete">discrete</a> | |
| media feature with two possible values: <code>none</code> and <code>auto</code>. It can be used to test whether the user agent supports |
index.html
Outdated
| <li>The user agent does not implement the Screen Orientation API</li> | ||
| <li>The document is not [=Document/fully active=]</li> | ||
| <li>The document has the [=sandboxed orientation lock browsing context flag=] set</li> | ||
| <li>The document's [=Document/visibility state=] is "hidden"</li> | ||
| <li>The current context doesn't meet the [=pre-lock conditions=]</li> |
Copilot
AI
Oct 17, 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.
[nitpick] Inconsistent list formatting: this list item lacks ending punctuation while other items in the list use semicolons or periods. Ensure consistent punctuation across all list items for better readability.
| <li>The user agent does not implement the Screen Orientation API</li> | |
| <li>The document is not [=Document/fully active=]</li> | |
| <li>The document has the [=sandboxed orientation lock browsing context flag=] set</li> | |
| <li>The document's [=Document/visibility state=] is "hidden"</li> | |
| <li>The current context doesn't meet the [=pre-lock conditions=]</li> | |
| <li>The user agent does not implement the Screen Orientation API.</li> | |
| <li>The document is not [=Document/fully active=].</li> | |
| <li>The document has the [=sandboxed orientation lock browsing context flag=] set.</li> | |
| <li>The document's [=Document/visibility state=] is "hidden".</li> | |
| <li>The current context doesn't meet the [=pre-lock conditions=].</li> |
ea01973 to
b76a334
Compare
Closes #206
The following tasks have been completed:
Implementation commitment:
Preview | Diff