Show HN: AspectRat.io – Aspect ratio calculator and device resolutions resource
1–10 of 34 posts
Re: Show HN: AspectRat.io – Aspect ratio calculator and device resolutions resource
#2Re: Show HN: AspectRat.io – Aspect ratio calculator and device resolutions resource
#3 w := 1900
h := 1200
divisor := gcd(w, h)
aspect := fmt.Sprintf("%d:%d", w/divisor, h/divisor)
func gcd(x, y int64) int64 {
for y != 0 {
x, y = y, x%y
}
return x
}Re: Show HN: AspectRat.io – Aspect ratio calculator and device resolutions resource
#4Not sure why make a whole website of this w := 1900 h := 1200 divisor := gcd(w, h) aspect := fmt.Sprintf("%d:%d", w/divisor, h/divisor) func gcd(x, y int64) int64 { for y != 0 { x, y = y, x%y } return x }
The limit on ridiculous things people will somehow make into a "web service" knows no bounds.
Re: Show HN: AspectRat.io – Aspect ratio calculator and device resolutions resource
#5What’s the use case for the CSS code? The `padding-top` value doesn’t account for the OS and browser’s chrome (status bar, URL bar, etc.), so the `.inner` element doesn’t fit into the viewport.
Re: Show HN: AspectRat.io – Aspect ratio calculator and device resolutions resource
#6Not sure why make a whole website of this w := 1900 h := 1200 divisor := gcd(w, h) aspect := fmt.Sprintf("%d:%d", w/divisor, h/divisor) func gcd(x, y int64) int64 { for y != 0 { x, y = y, x%y } return x }
Re: Show HN: AspectRat.io – Aspect ratio calculator and device resolutions resource
#7Not sure why make a whole website of this w := 1900 h := 1200 divisor := gcd(w, h) aspect := fmt.Sprintf("%d:%d", w/divisor, h/divisor) func gcd(x, y int64) int64 { for y != 0 { x, y = y, x%y } return x }
Re: Show HN: AspectRat.io – Aspect ratio calculator and device resolutions resource
#8You can fix the broken CSS for Firefox by adding -moz-appearance in addition to -webkit-appearance.
https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-appear...
Re: Show HN: AspectRat.io – Aspect ratio calculator and device resolutions resource
#9The site has a bit of Webkit-only CSS. Tip: don't use bleeding edge CSS like appearance , and if you do, at least test it in Chrome, Edge, and Firefox. You can fix the broken CSS for Firefox by adding -moz-appearance in addition to -webkit-appearance . https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-appear...
Re: Show HN: AspectRat.io – Aspect ratio calculator and device resolutions resource
#10Not sure why make a whole website of this w := 1900 h := 1200 divisor := gcd(w, h) aspect := fmt.Sprintf("%d:%d", w/divisor, h/divisor) func gcd(x, y int64) int64 { for y != 0 { x, y = y, x%y } return x }