16 ms·
Show HN: USA.css – units set in inches, 1776 bytes
- hosteur 6y agoWhy?
- ancarda 6y agoBecause it's a bit of fun, why not?
- webmobdev 6y agoBecause freedom units ( https://www.urbandictionary.com/define.php?term=freedom%20units https://www.urbandictionary.com/define.php?term=freedom%20un...) are better than the metric system.
- Yetanfou 6y agoJust make sure not to use this stylesheet when describing the route towards a distant planet so as to avoid ending up in a smoking crater instead of in the promised land.
- dvtrn 6y agoinstead of the promised land There’s plenty of options out there in the wild black yonder of space. Just try to avoid Europa. Bit of a dispute over land rights with that one.
- wumms 6y agoUse them together. Use them in peace.
- hedora 6y agoOr, use a type safe language. Will web developers and rocket scientists ever learn?
- pbhjpbhj 6y agoIf you need to cut your website with primitive wood working tools ...
- dylan604 6y agoWhose to say they didn't build their own Arduino controlled CNC to do the wood working?
- zacksinclair 6y agoI didn't even know you could set inches! Happy 4th!
- mediumdeviation 6y agoMostly useful for print stylesheets. On screens it seems to be defined as a constant 96px[1], which means it has no correspondence to physical inches. [1]: https://hacks.mozilla.org/2013/09/css-length-explained/ https://hacks.mozilla.org/2013/09/css-length-explained/
- CivBase 6y agoWelcome back to HNC News. Tonight's top story: US law makers have introduced a new bill that would require all digital displays in the United States to feature a pixel density of 96 ppi. White house officials say the new bill represents "the first step on the march to bring freedom to the cyber world". More on this after the break.
- pcunite 6y agoI would scream from my office. Almost no one would understand my pain.
- tempodox 6y agoBut it would make screens great again! Especially retina screens.
- Shared404 6y agoAnchor: "Let's bring in a Congressman who agreed to comment on this extraordinary turn of events" Congressman: "I'm glad to support the expansion of freedom to all realms. Thankfully, it is now safe for us to do this that we can defend ourselves against the dangerous 'cypherpunks'. Thank you to everyone who has helped make this possible"
- kalleboo 6y ago
- dc_ist 6y agohttps://designsystem.digital.gov https://designsystem.digital.gov
- bob1029 6y agoI think its really great that this exists. Bonus points for it being a public project on GitHub that any American can contribute to. It's also really hard to argue with the licensing terms.
- klyrs 6y agoWeirdly, bennettfeely had 1776 karma when I clicked their profile. Conspiracy? Coincidence?
- Stratoscope 6y agoAnd 1812 when I clicked just now. This must mean something!
- iliaznk 6y ago1812 – that's when Napoleon invaded Russia.
- Svip 6y agoI think they were referring to the War of 1812. A war the US lost, and where the song "The Star Bangled Banner" comes from.
- adventured 6y ago> I think they were referring to the War of 1812. A war the US lost The outcome of history indicates the US won that war. Technically it was considered a stalemate. The US lost no territory, repelled a malevolent empire again, kept its economy & trade fully intact, and won numerous major battles throughout the war. In the following decades the US became an economic juggernaut, while the British Empire began to fade into the history books. A supposedly mighty empire failed twice in less than 40 years to bring a small nation to its knees. Quite humiliating. https://en.wikipedia.org/wiki/War_of_1812 https://en.wikipedia.org/wiki/War_of_1812 - "In 1813, the US won the Battle of Lake Erie, gaining control of the lake, and they defeated Tecumseh's Confederacy at the Battle of the Thames, defeating Britain's largest Native American ally, a primary war goal." - "In 1814, the British burned Washington, but the US later repulsed British attempts to invade New York and Maryland, ending invasions from Canada into the northern and mid-Atlantic states." - "Attempts to smother American maritime trade failed, however, and soon both sides began to desire peace." - "In early 1815, after a peace treaty had been signed, but before this news had reached the Americas, the US defeated the British Army near New Orleans, Louisiana." - "Peace negotiations began in August 1814, and the Treaty of Ghent was signed on December 24, 1814. News of the peace finally reached America in February 1815 about the same time as news of the victory at New Orleans. The Americans triumphantly celebrated the restoration of their national honor, leading to the collapse of anti-war sentiment and the beginning of the Era of Good Feelings, a period of national unity. The treaty was unanimously ratified by the US Senate on February 17, 1815, ending the war with no boundary changes"
- deleted 6y ago[deleted]
- themodelplumber 6y agoWhat 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.
- klyrs 6y agoIf you need to rive a 5cm length in twain and you don't like fractions. Or if you're making a website devoted to larval geometer moths.
- dragonwriter 6y ago> If you need to rive a 5cm length in twain and you don't like fractions 125/127 is as much of a fraction as 1/2.
- deleted 6y ago[deleted]
- jacquesm 6y agoTrying to imagine someone from France, Australia or Brazil to do something similar and failing.
- Retr0spectrum 6y agoUhhh why France?
- jacquesm 6y agoWithin the EU France is quite nationalist compared to others, and yet, I fail to imagine someone there producing something like this. I'm a bit allergic to flag waving.
- Retr0spectrum 6y agoAh, I interpreted it as a comment on the difficulty of creating the national flags in pure CSS.
- jacquesm 6y agoThe French one, in that case would seem trivial in comparison.
- Retr0spectrum 6y agoHence the reason for my original comment.
- mhh__ 6y agoSystème international? We already use french units
- jacquesm 6y agoNo, 'international' does not mean 'French'. Yes, the French came up with it but since it now has international adoption it is the international standard with the United States as one of the last hold-outs. That's what you get when you have a country run by lawyers with very limited input from science.
- eevilspock 6y agoThis is one of the more Trumpian things I've seen on HN.
- deleted 6y ago[deleted]
- eevilspock 6y agoWhat 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
- rrss 6y ago1852. "It was a great thing to achieve American Independence when we numbered three millions, but it was a greater thing to save this country from dismemberment and ruin when it numbered thirty millions." ~ Frederick Douglass, 1881. May the United States of America acknowledge what is bad, celebrate what is good, and go on to do greater things in the future.
- pcunite 6y agoAmen, he writes well: "As I have said, this southern threat lost many votes, but it gained more than would cover the lost. It frightened the timid, but stimulated the brave; and the result was—the triumphant election of Abraham Lincoln." [1] https://en.wikisource.org/wiki/Life_and_Times_of_Frederick_Douglass_(1892)/Chapter_31 https://en.wikisource.org/wiki/Life_and_Times_of_Frederick_D...
- ixtli 6y agoMarx wrote a letter of congratulations to Lincoln when he was elected as well, as a referendum on slavery. It would be silly to think that is uncritical support of the country tho.
- eevilspock 6y agowypipo. always cherry picking for comfort and absolution.
- deleted 6y ago[deleted]
- gerikson 6y agoMetric inches or survey inches? https://en.wikipedia.org/wiki/Foot_(unit)#International_foot https://en.wikipedia.org/wiki/Foot_(unit)#International_foot)
- PedroBatista 6y agoAmerican inches.
- hedora 6y agoI’m sure it inherits from the DPI your monitor reports. I wonder if any manufacturers let you specify which one you mean, or if it’s like drives, where they always pick the smaller one to make a few extra pennies. The standards boards should step in to avoid confusion.
- OJFord 6y agoHuh, I didn't know about this, that feet and inches used to differ across the world. If only they'd done pints, fluid ounces, and cups, etc. too! (Cups are particularly annoying: there's British, US, US Legal, and metric. The best recipe-following advice is that it's never going to matter. But it's annoying.)
- petepete 6y agoI thought the whole point of cups was that the actual quantity didn't matter, so long as your ratios were consistent.
- irrational 6y agoMeasuring by volume was from a time period before we had reliable digital scales. These days all baking measuring should be done by weight since it is far more accurate. I won’t even consider a recipe that goes by volume. Fortunately those are all written by amateurs.
- progman32 6y ago
- quda 6y agoAwful kitsch!
- elagost 6y agoI'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>
- purpleidea 6y agoRelevant units: https://i.redd.it/582slv24n1741.jpg https://i.redd.it/582slv24n1741.jpg PSA, don't use old deprecated units still pushed by confused country.
- serf 6y ago>PSA, don't use old deprecated units still pushed by confused country. I understand perfectly. Everyone, stop measuring weights in stone -- England has been declared confused!
- wizzwizz4 6y agoI mean… the only thing still measured in stone is babies, and even that's falling out of favour.
- joshuaissac 6y agoMost adults in the UK still measure their weight in stones and pounds, at least in my personal experience, and I have never come across anyone (except those raised in other countries) using either plain pounds or metric units for this purpose.
- learnstats2 6y agoAdults in the UK who take sport in any way seriously are more likely to quote their weight in kg, in my experience.
- Symbiote 6y agoBabies weigh less than 1 stone (14 lb), they would traditionally be weighed in pounds and ounces. From searching "baby weight NHS", it looks like all the advice uses grams, so I assume that's current practise.
- wizzwizz4 6y agoWell, I must've completely misunderstood several conversations, then. Which would be characteristic.
- mariofa 6y agohttps://www.theverge.com/2020/7/2/21311330/twitter-engineers-master-slave-github-programming-racism https://www.theverge.com/2020/7/2/21311330/twitter-engineers...
- banksy__ 6y agoPeople who enjoy waving flags don't deserve to have one –Banksy https://www.goodreads.com/quotes/410220-people-who-enjoy-waving-flags-don-t-deserve-to-have-one https://www.goodreads.com/quotes/410220-people-who-enjoy-wav...
- KKKKkkkk1 6y agoOnly 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.
- corndoge 6y agoeagle screams
- kevin_thibedeau 6y agoActually a red tailed hawk.
- hedora 6y agoI think you meant turkey.
- sethammons 6y agoFor those not following, the Red Tailed Hawk’s call is nearly universally used as a substitute for the sounds of Bald Eagles in most media. Bald Eagles don’t sound similar.
- egd 6y agoIt's understandable. Bald Eagles sound genuinely hilarious for a bird that big.
- serf 6y agoWas your point against the user, the concept, the measurement standard, or just triggered by any vague mentioning of the United States? It's difficult to sort through the negative sentiments to get to real point. Be more clear with your hostility and anger next time, would'ya?
- KKKKkkkk1 6y ago
- khanan 6y agoALL COUNTRIES MATTER! You, sir, are racist.
- wizzwizz4 6y agoContrary to popular belief, there is actually a distinction between patriotism and nationalism. https://www.smbc-comics.com/comic/an-important-distinction https://www.smbc-comics.com/comic/an-important-distinction
- dang 6y agoCould you please stop posting unsubstantive comments to Hacker News?
- lucidlogic 6y agoHow is this relevant?
- Minor49er 6y agoIt's something techie on America's birthday
- lucidlogic 6y agoYou know there's a bunch of other countries other right? This shouldn't be number 1 on hn.
- lucidlogic 6y agoI always thought hn was impartial and scientific, this is not.
- saagarjha 6y agoAmericans generally make up the majority of visits to most websites, including Hacker News, so you're generally going to see a slant towards it.
- jfkebwjsbx 6y agoThat would be very surprising considering how small it is compared to eg Europe alone. So citation needeed, I guess.
- saagarjha 6y agoThe United States is the world's third most populous country, and home to a number of technology businesses–one of the main draws of the site. I don't know if anyone has officially disclosed Hacker News's traffic data, but a lot of people have done analysis of what kind of traffic they get from being on the front page and it's invariably dominated by the United States: https://nicklafferty.com/blog/what-happens-when-you-re-on-the-front-page-of-hacker-news/ https://nicklafferty.com/blog/what-happens-when-you-re-on-th...
- alexseman 6y agoAs 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.
- TheSpiceIsLife 6y agoNo women were involved?
- AmazingTurtle 6y agoYou're just trying to hop on the train, ain't you?
- d33 6y agoI actually believe that their question was a right one to ask.
- TheSpiceIsLife 6y agoNo. How hard would it be to write "men and women" (or "women and men"). What do you reckon? The fellas who "did all the work" in US history, you reckon they did all their own cooking and cleaning, you reckon their intimate partners, or close-others didn't contribute any to the people whom history attributes greatness? Probably not old boy, fair chance the wives, partners, and mistresses went a long way to getting us where we are. And that's if they weren't directly responsible but not attributed. How's that saying go, next to every great man is an even greater women. It's often true, except that the woman part could be generalised to partner or carer. Some people act alone, outliers though. And to still, in this socio-political climate, not to bother to include women is, at least, tone deaf, if not outright intentionally exclusive.
- quicklime 6y agoMaybe try to assume best intent, and assume that this person doesn't speak English as their first language?
- novok 6y agoDefinitely only tested on chrome. The .usa-conic item doesn't render at all in firefox :)
- andrewnicolalde 6y agoBeautiful!
- nautilus12 6y agoGood 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
- nxc18 6y agoPatriotism is about fighting for the principles and values espoused in the constitution, and working towards improving an imperfect republic, not worshiping the flag. It’s a fun project and I like the colors, but let’s not pretend that the flag and the idea of ‘patriotism’ are anything other than distractions from the work that needs to be done.
- mazeltovvv 6y agoInterestingly, everytime I hear this I feel like the constitution is treated like the bible, some holy book holding the truth. That is very dangerous imo
- nxc18 6y agoThe constitution is the document that defines the existence of the United States and all of the rights, freedoms, and protections it provides and aspires to provide. It’s not perfect, but it is a heck of a lot better than blind adherence to the flag and whoever waves it. Seeing as the constitution defines the United States, I think you get a lot closer to the truth when reflecting on it than you do when worshiping the flag or the military or whatever else it is that July 4th is supposed to be about. It is also important to remember that the constitution is a living document, meant to grow and evolve over time. If there are problems - and there are - it is up to us to change it.
- hedora 6y ago> whatever else it is that July 4th is supposed to be about The Declaration of Independence; an aspirational document saying why the constitution was needed, and also a big F-you to Britain and tyranny around the world.
- chrismorgan 6y agoFeels 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.)
- jedberg 6y agoWe usually use fractions, but sometimes we're forced to use decimals, usually when related to computers, since the usual fractions don't translate well to decimal.
- jholman 6y agoWait, what? You're saying that Americans preferentially use base-2 fractions (nearly) everywhere except on computers; on computers you preferentially use base-10, even though said computers are going to store the values as base-2? That's the funniest thing I've heard all week.
- brudgers 6y agoA feature of some English measures is unbiased division into three equal parts, e.g. Three teaspoons to the tablespoon, twelve inches to the foot, and twelve ounces to the pound (for one of several definitions of “ounce”). Thirds don’t fit neatly into binary nor do they fit neatly into decimal. This is what the comment refers to.
- vandahm 6y ago> "on computers you preferentially use base-10, even though said computers are going to store the values as base-2?" I don't understand this comment at all. Most people are not computer programmers and therefore have no insight into how computers represent numbers. They just populate text fields in Excel, or whatever, with numbers. It's easier to use decimal points to do that than fractions. When I'm not using computers or calculators, I do prefer American-style fractions over decimal point representations. Fractions are a lot easier for me to manipulate in my head. If I'm out in my garage, upside down, underneath a car, and trying to decide which drill bit to use, I don't have convenient access to the calculator on my cell phone or a pencil and paper, and reliable mental math is important. The fractions are easier, so that's what I want.
- bjourne 6y agoCool! This is the kind of things that I love to see on HN.
- Carpetsmoker 6y agoI 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
- swebs 6y agoIt's just a bit of fun. Not everything has to be some sort of statement.
- Carpetsmoker 6y agoI guess ... but "God Bless America!" seems like a statement to me.
- kube-system 6y agoIt’s Independence Day in the US. Patriotism is the theme of the day. This is just a humorous holiday-themed style sheet with a readme to match. It is not a serious style sheet that the author expects anyone to use.
- Carpetsmoker 6y agoPerhaps this is a cultural difference, but the entire thing just seems strange from my own (European) perspective. Only in the US do people seem to take pride in their measurement system as some sort of patriotic symbol, which is why I originally thought it was a parody shrug I'm not even going to get started with all the problems I see with "God bless America", which would be long, tedious, probably inflammatory, and fairly off-topic.
- swebs 6y agoYou're reading way too into this. Someone just decided to have some fun and share it with HN. It isn't really serious, but parody isn't the right description. People aren't taking pride in the measurement system, that's somewhat of a joke. "God bless America" is a common cheer taken from a popular song. The UK has something similar with "God save the queen".
- blackhope 6y agoThis 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.
- brightball 6y agoNo, it’s not. Before American independence the British crown held slaves. Prior to independence both SC and Virginia actually requested to pause or slow down the slave trade. They had to make this request to England and it was refused. The Declaration of Independence laid the groundwork for the eventual end of slavery that culminated in the Civil War. After US independence, Britain began to wash their hands of slavery eventually in 1834. It’s also worth keeping in mind because during the War of 1812 the British attempted to arm both slaves and native Americans to help their war effort...while still practicing slavery themselves. You can imagine the effect such an action had on local relations as well. America’s independence should be celebrated by everyone. Selective history should not.
- blackhope 6y ago> Before American independence the British crown held slaves. Well exactly. And it was a practice that continued for many, many years afterwards. Arguably the early US economy was mostly built upon slavery. All that wealth created by people forced into labour who received no compensation for their hard work, but instead just enriched the slave owners. It's selective history to ignore this and pretend that America was some beautiful egalitarian society striving towards anti-slavery from the start, and that any slavery that remained was solely the fault of the British. This should be a day of shame and dishonor, if we're not being selective about history.
- gnuisance 6y agoTunnel visioning on slavery is a pretty bad mindset. There are many facets to American society beyond slavery. It's almost impossible to imagine a person today who supports slavery. We've come a long way, and nobody is celebrating slavery.
- max0563 6y agoThis is fantastic. Happy Independence Day!
- anonytrary 6y agoIt'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.
- dylan604 6y agomeh, call it done. it's modifiable by the user, so leave it alone and let the user mess with it. i have no idea what the author's intentions are/were for the project, but it seems like 'mission accomplished'.
- anonytrary 6y agoFWIW I'm not saying I dislike the project, I love when people post quirky projects like this to HN for fun. I'm just saying that even the smallest change to this project would cause the author to lose the "1776 USA" marketing strategy. One could say it's an unstable strategy at a local maximum.
- dylan604 6y agoWhat name are you concerned about? The file is called 'usa.css'. The file size is specifically listed right next to the download link. Not unusual. If the file size does change, it'll just be another number, yet the name of the file/project is still 'usa.css'.
- anonytrary 6y agoI'm talking about the cute fact that the library is 1776 bytes. It was obvious that author deliberately tweaked the file size to be 1776 bytes, to aid in the marketing of the library, and that expecting to keep the file size at 1776 bytes is an unrealistic goal if the author wishes to iterate on the code. I don't get why this is being made into a huge issue. It's a simple observation.
- noncoml 6y agoComing 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...!