top | item 42468318

My favourite colour is Chuck Norris red

519 points| OuterVale | 1 year ago |htmhell.dev

100 comments

order
[+] liontwist|1 year ago|reply
This article appears to be recycling content from a 13 year old top stack overflow question:

https://stackoverflow.com/questions/8318911/why-does-html-th...

Truly any interesting thing ever created on the internet will be exploited for marketing until the end of time. Unfortunate that old redditors and other forum contributors were not able to capture the millions of dollars of value created from their work.

EDIT: I did see it’s at least referenced at the end.

[+] hnuser123456|1 year ago|reply
Marketing? I don't see anything for sale or even any ads on the blog page.
[+] BeFlatXIII|1 year ago|reply
> Unfortunate that old redditors and other forum contributors were not able to capture the millions of dollars of value created from their work.

It's all down to a lack of viable micropayment infrastructure. See also: ad tech.

[+] inopinatus|1 year ago|reply
My favourite outcome is that 'chocolate' is reduced to '#c0c0a0'
[+] jffhn|1 year ago|reply
'shiny' gives pitch black, and 'obscure' gives blue sky color.
[+] interactivecode|1 year ago|reply
I love how forgiving the web is. These days you can get strictness with typescript and the like, which is great for businesses and work. But the forgiving nature of html and css and even javascript has contributed to so much adoption. Plus grew one of the most important things in an platform the ecosystem itself. Seeing rust slow down with piles of crates and fall into the same issues, js and npm has, perhaps its not a language problem but a ecosystem size problem. Larger user base === larger problems

If you really want pedantic strictness and perfection, native applications are the place to work. But it isnt always better.

And the web is fast, like really fast in rendering highly markedup text layouts. Just because everyone uses a frontend framework for “maintainability” doesn’t mean the engine is slow.

[+] highwaylights|1 year ago|reply
I do appreciate all of what you’ve said but the author of this piece is actually mistaken.

The browser isn’t actually processing the string “chucknorris” and forgiving incorrectly provided hex codes, which is a common misconception.

What actually happens within the rendering pipeline is that the full literal string (in this case, “chucknorris”) is parsed, and the browser attempts to render the tag in the colour of blood in hope of receiving the mercy that Chuck Norris doesn’t have.

As said, it’s a common misconception and I’m glad I could clear it up before he reads this.

[+] gizmo|1 year ago|reply
The web solved distribution and that's why the web won. Click on a link see a page. Click on a link open an app. The alternative was downloading a .exe from questionable origin over an unreliable dial-up connection. App stores have become hugely successful since and if Microsoft had invented the mobile app model in the 90s (sandboxing and 1 click install process, like flatpak on linux) that model would probably have won instead of the web app. The web was incredibly buggy and horrifically slow for 2 decades, but there was no alternative so it won by default.
[+] ivanjermakov|1 year ago|reply
> I love how forgiving the web is

I have completely opposite opinion. This "forgiveness" comes at a cost:

- unexpected behavior instead of an early crash

- hard to treat the platform seriously for mission critical tasks

- makes it common to have many ways to solve the same problem

[+] tuyiown|1 year ago|reply
> And the web is fast, like really fast in rendering highly markedup text layouts. Just because everyone uses a frontend framework for “maintainability” doesn’t mean the engine is slow.

Yes and no. Many many non trivial things becomes very slow if you stick naïve ways with larger amounts for visual elements. It bites hard, because even naïve ways of doing things require quite some time for complex UIs, and very often, the roadblock requires to redo most if not all of the work.

[+] lenkite|1 year ago|reply
I don't love how forgiving the web is. We would all spend far less time debugging painful HTML/CSS/JS issues if the web was stricter. I think several billion man-hours would have been saved and human civilization probably more advanced. Also health-insurance costs would be reduced and web-developer lifespan likely increased thanks to less blood pressure.

(Don't think the Rust analogy really holds. npm is worse than Cargo. Of-course things could be better - a blessed standard extensions library: `stdx` with a quarterly update cycle and the crate nightmare will be solved)

[+] codelikeawolf|1 year ago|reply
This was a good read, but the author is mistaken: chucknorris isn't rendered as red, red is rendered as chucknorris.
[+] devmor|1 year ago|reply
This reminded me of one of my first web-dev projects as a teenager - the first one I showed my (recently passed) father, in which you were prompted to ask "Chuck Norris" a yes or no question with a text box, and then would present you a yes or no answer with a suitable photo of the man himself.

I did some rudimentary string parsing on submit, and if the question started with a word like "Where", "How", "Why", "Who" and a few other words that signified the question couldn't be answered with Yes or No, it would show an angry photo of his face with the caption "Your question has angered chuck!" - I think I also gave it a 1% chance to randomly roll that result regardless.

My dad absolutely loved that little project, and reminded me of how funny he found it even this year shortly before we lost him, almost 2 decades after I'd made it.

Sorry this wasn't incredibly related to your submission, but I wanted to share a happy memory you just brought back to me with it.

[+] fooker|1 year ago|reply
This reminds me of the early web. So many fun websites like this.

Now it's just silos controlled by megacorps, trying to outdo each other in competition for attention.

[+] myk9001|1 year ago|reply
> Chuck Norris isn't a colour.

But the browser is too afraid to point that out.

(Sorry, I'll show myself out)

[+] thih9|1 year ago|reply
This means we can treat "o" as "0" (zero) because it gets automatically substituted like this anyway. E.g.:

    coffee
actually becomes:

    #c0ffee
Same with baobab (#ba0bab), decode (#dec0de), etc.
[+] cubefox|1 year ago|reply
Interesting. There are also differences between HTML and CSS:

    #fe11a710
becomes a sort of red in HTML, but a mostly transparent pink in CSS (for 8 digits hex numbers, the last two encode the alpha value).
[+] kiru_io|1 year ago|reply
Color names are a strange thing, it is like given names to numbers. I made a game out of it [0].

[0] https://colorguesser.com/

[+] ksymph|1 year ago|reply
> How is the score calculated? Oh man, this was harder than I thought.

Color is such a deceptively dangerous rabbit hole. A few months ago I entered a game jam intending to make a small pokemon-like where you collect colors rather than creatures. E.g. instead of fire>grass>water it would be red>green>blue, with randomly generated colors of any shade and about half a dozen 'types'. Trying to figure out the math of that nerd sniped me for a couple weeks, didn't even get started on the rest of the game before the jam ended.

[+] istjohn|1 year ago|reply
I would love this with a limited, accurate color list. It would be a fun way to learn more obscure colors like chartreuse, ochre, and sienna. I'd particularly like to learn the colors that are likely to come up in literature (e.g., [0]). As it is, I got "Jaycey's Favorite" as one of the colors.

0. https://www.vocabulary.com/lists/141957

[+] alex_duf|1 year ago|reply
that was fun! It would be nice to show my colour next to the result to compare a little more.
[+] Yujf|1 year ago|reply
Hah I played twice and did not meaningfully inprove my score. Even after seeing the color I could not match it up close enough, and the first time I got pretty close to most colors.
[+] djoldman|1 year ago|reply
> I've heard people quip that browsers should be less forgiving and enforce perfection. That allowing jank makes the web somehow 'bad'. I think a perfect web would be a boring web. I certainly wouldn't be here writing were it 'perfect'. It's about making the web work, no matter what we throw at it, and I wouldn't have it any other way.

It's probably less about "perfection" than precluding non-conformance to a standard from the beginning. The tale of imperfect beginnings to standards that haunt the world for decades repeats itself ad nauseam. In short, if one is clever enough to engineer a relatively future-proof standard, then one avoids (possibly substantial) wasted developer hours.

Note: This is NOT easy and things are sometimes obvious and unforgiving in hindsight.

[+] gedy|1 year ago|reply
XHTML tried this approach, but it failed for this and other reasons.
[+] mrob|1 year ago|reply
>I've heard people quip that browsers should be less forgiving and enforce perfection. That allowing jank makes the web somehow 'bad'.

Considering all the misery inflicted by computer crime that's enabled by the forgiving attitude, I 100% agree. And given the choice between "you can still visit the Space Jam website[0]" or "never worry about drive-by ransomware again", I'm pretty sure I'd be with the majority in choosing the latter. Security is a heavy price to pay for whimsy. Old-technology hobbyists could still run old web browsers in sandboxed VMs.

[0] https://www.spacejam.com/1996/

[+] gizmo|1 year ago|reply
It's a false choice in any case. Web browsers can support backward compatibility and at the same time offer a strict mode that benefits correctness and performance. Some real opportunities were missed to clean up JS semantics when Modules got introduced, for instance.
[+] josefx|1 year ago|reply
> Considering all the misery inflicted by computer crime that's enabled by the forgiving attitude, I 100% agree.

Parsers should strictly adhere to a standard, if the standard says they should be "forgiving" and that "forgiving" is well defined then all parsers should act this way. Inconsistent behavior between implementations opens its own can of worms that may leave a system in an inconsistent or insecure state.

[+] Thorrez|1 year ago|reply
I don't see how making browsers less forgiving would reduce drive-by ransomware. I don't think most browser vulnerabilities are related to the web being forgiving.
[+] yread|1 year ago|reply
I think the choice is more "writing a browser is a weekend project" vs "writing a browser is years of toil and you'll need a local copy of the internet to test it comprehensively"
[+] peutetre|1 year ago|reply
> After all, in a perfect web, "chucknorris" would just be another error message

Chuck Norris has only ever received one error message. He stared the computer down until it apologized and fixed the problem.

[+] sneak|1 year ago|reply
> The web is built on this foundation of resilience, both in technology and ethos. It's what allows a website from 1996 to still render in a modern browser. It's what lets a page load even when half the CSS is invalid. It's what makes it magic.

The concept of graceful degradation in web feature support is dead now. Presently most of the web fails to render at all if you don’t execute a giant javascript blob in full that is responsible for putting the words on the page. It’s quite sad.

[+] esperent|1 year ago|reply
The included codepen is unreadable on mobile until you remove -webkit-text-stroke from them CSS.

At the initial value of 0.5rem it gives a quite cool effect, as if the text has been badly redacted with a white highlighter. I initially thought that was intentional.

[+] jvdvegt|1 year ago|reply
Works fine on Android too, with Firefox.
[+] aetherspawn|1 year ago|reply
Works fine on iOS. It basically adds a white scribbly outline to the text which makes it easy to read the black text regardless of the background color.

It actually looks fantastic for such a low effort effect.

[+] orko|1 year ago|reply
"smurf" gives a nice #0000f0, ain't that funny?
[+] paradite|1 year ago|reply
Back the in the days I used a lot of d3.js for making visualizations.

Till today my favorite color for background, secondary text is still d3d3d3.

[+] bartread|1 year ago|reply
> If an octothorpe (#) is located at the start of the value, it's removed.

An “octothorpe”! I never knew it was called that (and, apparently, neither does autocorrect). What a glorious name!

[+] richrichardsson|1 year ago|reply
I wonder why it ended up being "hash-tag" on social media when it's quite common for North Americans to refer to the symbol as the "pound symbol"?
[+] qoez|1 year ago|reply
Feels like being back in 2012 all over again reading this