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

  • 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.

    (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.)

  • Weirdly, bennettfeely had 1776 karma when I clicked their profile. Conspiracy? Coincidence?

  • Metric inches or survey inches?

    https://en.wikipedia.org/wiki/Foot_(unit)#International_foot)

  • https://designsystem.digital.gov

  • I didn't even know you could set inches!

    Happy 4th!

  • Definitely only tested on chrome. The .usa-conic item doesn't render at all in firefox :)

  • I'm no web dev, so feel free to improve upon it. Think I got the proportions right though.

    <div class="usa-stars" style="height:134;width:190;float:left;"></div>

    <div class="usa-stripes-horizontal" style="height:250;width:475;"></div>

  • 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...!

  • Cool! This is the kind of things that I love to see on HN.

  • This is fantastic. Happy Independence Day!

  • Beautiful!

  • 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.

  • ALL COUNTRIES MATTER!

    You, sir, are racist.

  • Good to see some patriotism in a time when American patriotism has become faux pas. We live in a great country that doesn't need to be completely deconstructed in order to get better

  • Awful kitsch!

  • This is one of the more Trumpian things I've seen on HN.

  • How is this relevant?

  • Why?

  • People who enjoy waving flags don't deserve to have one –Banksy

    https://www.goodreads.com/quotes/410220-people-who-enjoy-wav...

  • Relevant units: https://i.redd.it/582slv24n1741.jpg

    PSA, don't use old deprecated units still pushed by confused country.

  • What have I, or those I represent, to do with your national independence? Are the great principles of political freedom and of natural justice, embodied in that Declaration of Independence, extended to us?... What, to the American slave, is your 4th of July? I answer; a day that reveals to him, more than all other days in the year, the gross injustice and cruelty to which he is the constant victim.

    ~ Fredrick Douglass

  • This is a reminder that the USA still held black folks as slaves in 1776.

    This was woven into American society from the very start.

    Recall that the Native Americans were referred to in the Declaration as "merciless Indian Savages", and have been systematically attacked and abused, also since the very start.

    If you're celebrating Independence Day today, this is what you are actually celebrating.

    It should be a day of sad contrition and sorrow for the racism and other evils wrought upon many generations, not a celebration.

    Consider this if you're enjoying Independence Day today.

  • What are some reasons to use inch units in screen-based CSS, aside from this kind of project?

    Edit: Removed all sentiment to my profile, leaving a beautifully rational shell of a comment.

  • It's cute that this library is 1776 bytes, but that's quickly going to change as bugs are found and new features need to get added. It seems like coupling a product's name to something that will likely change very shortly is just bad product naming.

  • I can't tell if this is intended to be serious or a parody? "All units set in inches" makes it sound like a parody, but the "God bless America" footer makes it sound serious? Hmmm

  • Trying to imagine someone from France, Australia or Brazil to do something similar and failing.

  • Only a true American patriot who is deeply devoted to the nation's ideals would zealously protect a system of units that has been thrown in the dustbin of history by the rest of humanity.