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

User browser native supports of aspect-ratio #46

Merged
merged 10 commits into from
Feb 7, 2021
Merged

Conversation

roderickhsiao
Copy link
Owner

@roderickhsiao roderickhsiao commented Dec 14, 2020

New aspect-ratio property launching in Chromium 88, Firefox 87, and Safari Technology Preview 118. [1]

Adding support for native calculation, keeping the same html structure while remove padding trick in favor of aspect-ratio

[1] https://web.dev/aspect-ratio/

@roderickhsiao
Copy link
Owner Author

Learnings so far

  • aspect-ratio does't take direct decimal like custom property
  • pseudo class fallback https://codepen.io/una/pen/BazyaOM doesnt work for iframe/img tag directly
  • pure css media query target same html might be possible but need tweaks

@roderickhsiao roderickhsiao changed the title [work in progress] prototype browser native supports of aspect-ratio User browser native supports of aspect-ratio Feb 7, 2021
@roderickhsiao roderickhsiao merged commit 2d909c2 into main Feb 7, 2021
@roderickhsiao roderickhsiao deleted the aspect-ratio branch February 7, 2021 05:05
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.

1 participant