TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: USA.css – units set in inches, 1776 bytes

457 pointsby bennettfeelyalmost 5 years ago

19 comments

chrismorganalmost 5 years ago
Feels strange to have single decimal places in your inch figures. I’d have expected something like eighths, sixteenths and thirty-seconds of inches, even though the decimal representation of them is unwieldy (1⁄32″ becomes 0.03125in). That also helps you avoid fractional pixels, which is worth doing if convenient: 1⁄32″ is 3px, because 1in is defined as 96px.<p>(As an Australian, the main place I’ve ever seen fractions of inches is old tools like spanners from before the adoption of the metric system, and that’s all fractions with powers-of-two denominators. But maybe Americans use decimal fractions of inches? I suppose I have seen laptop screens described in that way, e.g. 13.1″, 15.4″ and 15.6″, though people typically truncate to the inch.)
评论 #23735416 未加载
评论 #23734858 未加载
评论 #23735004 未加载
评论 #23734990 未加载
评论 #23734828 未加载
klyrsalmost 5 years ago
Weirdly, bennettfeely had 1776 karma when I clicked their profile. Conspiracy? Coincidence?
评论 #23734228 未加载
geriksonalmost 5 years ago
Metric inches or survey inches?<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Foot_(unit)#International_foot" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Foot_(unit)#International_foot</a>)
评论 #23734423 未加载
评论 #23734465 未加载
评论 #23734332 未加载
评论 #23734481 未加载
dc_istalmost 5 years ago
<a href="https:&#x2F;&#x2F;designsystem.digital.gov" rel="nofollow">https:&#x2F;&#x2F;designsystem.digital.gov</a>
评论 #23734631 未加载
zacksinclairalmost 5 years ago
I didn&#x27;t even know you could set inches!<p>Happy 4th!
评论 #23734073 未加载
novokalmost 5 years ago
Definitely only tested on chrome. The .usa-conic item doesn&#x27;t render at all in firefox :)
elagostalmost 5 years ago
I&#x27;m no web dev, so feel free to improve upon it. Think I got the proportions right though.<p>&lt;div class=&quot;usa-stars&quot; style=&quot;height:134;width:190;float:left;&quot;&gt;&lt;&#x2F;div&gt;<p>&lt;div class=&quot;usa-stripes-horizontal&quot; style=&quot;height:250;width:475;&quot;&gt;&lt;&#x2F;div&gt;
noncomlalmost 5 years ago
Coming to US after living in UK for a few years, what astonished me was not the fact that US is using the imperial system, but the US Gallon is different to the UK Gallon...!
bjournealmost 5 years ago
Cool! This is the kind of things that I love to see on HN.
max0563almost 5 years ago
This is fantastic. Happy Independence Day!
andrewnicolaldealmost 5 years ago
Beautiful!
alexsemanalmost 5 years ago
As an European this is really cool and unlike others self-loathing Americans here in the comments I understand the idea, humor and originality. Happy 4th USA, you are great today due to the greatness of your forefathers and the men that built this nation.
评论 #23734776 未加载
评论 #23734529 未加载
评论 #23734605 未加载
nautilus12almost 5 years ago
Good to see some patriotism in a time when American patriotism has become faux pas. We live in a great country that doesn&#x27;t need to be completely deconstructed in order to get better
评论 #23734657 未加载
themodelplumberalmost 5 years ago
What are some reasons to use inch units in screen-based CSS, aside from this kind of project?<p>Edit: Removed all sentiment to my profile, leaving a beautifully rational shell of a comment.
评论 #23734177 未加载
anonytraryalmost 5 years ago
It&#x27;s cute that this library is 1776 bytes, but that&#x27;s quickly going to change as bugs are found and new features need to get added. It seems like coupling a product&#x27;s name to something that will likely change very shortly is just bad product naming.
评论 #23735929 未加载
Carpetsmokeralmost 5 years ago
I can&#x27;t tell if this is intended to be serious or a parody? &quot;All units set in inches&quot; makes it sound like a parody, but the &quot;God bless America&quot; footer makes it sound serious? Hmmm
评论 #23736254 未加载
jacquesmalmost 5 years ago
Trying to imagine someone from France, Australia or Brazil to do something similar and failing.
评论 #23734441 未加载
评论 #23734111 未加载
mariofaalmost 5 years ago
<a href="https:&#x2F;&#x2F;www.theverge.com&#x2F;2020&#x2F;7&#x2F;2&#x2F;21311330&#x2F;twitter-engineers-master-slave-github-programming-racism" rel="nofollow">https:&#x2F;&#x2F;www.theverge.com&#x2F;2020&#x2F;7&#x2F;2&#x2F;21311330&#x2F;twitter-engineers...</a>
KKKKkkkk1almost 5 years ago
Only a true American patriot who is deeply devoted to the nation&#x27;s ideals would zealously protect a system of units that has been thrown in the dustbin of history by the rest of humanity.
评论 #23734324 未加载
评论 #23734311 未加载
评论 #23734558 未加载