Skip to content
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

add responsive example using container queries #347

Merged
merged 13 commits into from
Nov 15, 2022

Conversation

gkatsev
Copy link
Contributor

@gkatsev gkatsev commented Oct 21, 2022

left to do in this PR:

@vercel
Copy link

vercel bot commented Oct 21, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
media-chrome ✅ Ready (Inspect) Visit Preview Nov 15, 2022 at 10:45PM (UTC)
media-chrome-docs ✅ Ready (Inspect) Visit Preview Nov 15, 2022 at 10:45PM (UTC)

display: none;
}
}
@container (min-width: 590px) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

large view

display: none;
}
}
@container (max-width: 420px) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small view. Needs to come after the medium view due to specificity ordering since safari doesn't support @container (min-width: 420px) and (max-width: 590px) while chrome does.

justify-content: space-evenly;
}

@container (max-width: 590px) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium view. Ideally, this would be @container (min-width: 420px) and (max-width: 590px) but not supported in Safari.

slot="media"
src="https://stream.mux.com/DS00Spx1CV902MCtPj5WknGlR102V5HFkDe/high.mp4"
muted
crossorigin="anonymous"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

firefox wasn't liking crossorigin only.

}

@container (max-width: 590px) {
.centered-controls-overlay:not(.container-query-polyfill) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the polyfill was saying that we need to add the :not(.container-query-polyfill) because it's saying that :where isn't supported, though, supposedly, :where is available according to caniuse.com https://caniuse.com/mdn-css_selectors_where

Copy link
Collaborator

@cjpillsbury cjpillsbury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One non-blocking nitpick. Otherwise 😎.

@gkatsev
Copy link
Contributor Author

gkatsev commented Oct 25, 2022

If/when GoogleChromeLabs/container-query-polyfill#65 gets merged, the separate responsive-polyfill page can probably be removed because :where support goes pretty far back. Though, :where won't be on smart TVs for years

Copy link
Contributor

@luwes luwes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -10,7 +10,9 @@ provide one configuration for a responsive media player. However media themes
will be introduced soon that can provide responsive behavior by default.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove media themes sentence

</media-control-bar>
</media-controller>
```
And it'll look like this:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this player

Copy link
Collaborator

@dylanjha dylanjha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

talked through a couple minor changes with Gary sync

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.

4 participants