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

アスペクト比はCSSでやる #17

Open
shun91 opened this issue Dec 10, 2021 · 4 comments
Open

アスペクト比はCSSでやる #17

shun91 opened this issue Dec 10, 2021 · 4 comments

Comments

@shun91
Copy link
Owner

shun91 commented Dec 10, 2021

@shun91
Copy link
Owner Author

shun91 commented Dec 10, 2021

image

image

@shun91
Copy link
Owner Author

shun91 commented Dec 11, 2021

該当部分はアスペクト比の計算ロジックっぽいけど、これってCSSだけでうまいことできなかったっけ?

@shun91
Copy link
Owner Author

shun91 commented Dec 11, 2021

これでいけそう

CSS aspect-ratioプロパティの使い方、レスポンシブやレイアウトシフトで大活躍 | コリス
https://coliss.com/articles/build-websites/operation/css/how-to-use-aspect-ratio-css-property.html

shun91 added a commit that referenced this issue Dec 11, 2021
setTimeout消すだけだとスコアが悪くなったので試す
@shun91
Copy link
Owner Author

shun91 commented Dec 11, 2021

誤差かもしれないけどsetImmediateの方が少しスコアがよかった

ただ、本来的には #17 (comment) の対応をしたほうが良さそう

@shun91 shun91 changed the title setTimeoutが不要かも? アスペクト比はCSSでやる Dec 11, 2021
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

No branches or pull requests

1 participant