Skip to content

Conversation

@marcoscaceres
Copy link
Member

@marcoscaceres marcoscaceres commented Oct 17, 2025

Closes #206

The following tasks have been completed:

  • Modified Web platform tests (link to pull request)

Implementation commitment:


Preview | Diff

Copy link
Contributor

Copilot AI left a 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-orientation media feature with none and auto values
  • 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
Comment on lines 910 to 911
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
Copy link

Copilot AI Oct 17, 2025

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
index.html Outdated
Comment on lines 923 to 927
<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>
Copy link

Copilot AI Oct 17, 2025

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.

Suggested change
<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>

Copilot uses AI. Check for mistakes.
- Implement can-lock-orientation media feature for Issue #206
- Add privacy considerations to prevent fingerprinting through user preferences
- Include examples showing CSS and JavaScript usage
- Update abstract to mention CSS media features

Fixes #206
@marcoscaceres marcoscaceres force-pushed the add-css-media-feature-206 branch from ea01973 to b76a334 Compare October 17, 2025 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add can-lock-orientation media feature to detect if locking is possible

1 participant