I just recently listened to a talk by Hidde de Vries entitled “On the origin of waterfalls”. It was an interesting talk filled with fascinating historic bits about the origins and development of doing designs in the internet browser.
Hidde mentions how adaptive CSS has actually been and continues to be and he compares that to this concept of natural choice. He mentions that a person of the greatest factors to the success of CSS is its capability to adjust to the wide array of requirements originating from the user base of the web.
Particularly, I actually delighted in Hidde’s shakedown of the “CSS is Amazing” meme. You most likely understand it. I have actually seen it. I have actually made fun of it. It’s a renowned representation of what individuals view as incorrect with CSS:
Hidde turns this joke on its head and mentions that this joke in fact shows how remarkable CSS is.
What you see in the image is CSS by default From this beginning point, you have choices. CSS does not rate what you’re attempting to do.
Wish to let the including box grow dynamically with its contents? You can do that with a bit more CSS.
Wish to keep sizing and cut off material when it overruns its containing box? You can do that with a little various CSS:
And, as one more example I’ll include myself: wish to truncate text that overruns its containing box? That’s likewise possible with a little additional CSS:
CSS does not understand which of those– or others– were your objective. Instead of guess, it begins at a base level and branches into a range of results with each extra styling guideline.
This is the power of CSS. It provides you choices. Utilize them or do not.
So the dots Hidde links, which I ‘d never ever create, is that when we see this:
And we point and jest, that is simply us not liking– or understanding– the defaults fundamental in CSS. The overflow is working here as defined. We just have not found out or comprehended CSS on that much deeper level.
real == " real"
On the surface area, yes that’s odd. However if you take a look at the specification and comprehend the systems that are at play deep in the language (browbeating in this example), you’ll start to comprehend how and why the specification is composed the method it is.
This is exactly what Kyle Simpson argues in his mind-blowing book You Do Not Know JS:
While developed to assist you, implicit browbeating can produce confusion if you have not made the effort to find out the guidelines that govern its habits. Many JS designers never ever have, so the typical sensation is that implicit browbeating is puzzling and damages programs with unanticipated bugs, and ought to therefore be prevented. It’s even often called a defect in the style of the language.
This is best inline with an informative belief revealed by Josh Comeau in his post “The Value of Knowing CSS”:
CSS is a really implicit language; it relies greatly on systems buried deep in the CSS requirements. When those systems operate in methods we do not anticipate, we’re left in the dark, unsure what the heck is going on.
When we compose code– in any language– we count on our psychological design of how that language works. If our psychological design is insufficient or inaccurate, there’s a great chance that we will not get the outcome we were anticipating. In CSS, those misalignments are very typical, due to the fact that of how implicit CSS is.
This all falls best inline with a belief I have actually revealed prior to about how “the working understanding of [HTML/CSS/JS] are less about syntax and more about how things work.” CSS is, in truth, remarkable. Acquainting ourselves with its hidden guidelines and systems permits us to totally acknowledge its awesomeness.
Chris connected to this post from CSS-Tricks where he offers a lot more history behind the “CSS is Amazing” meme, consisting of Brandon Michael discussing it on CSS-Tricks circa 2017, Steven Frank, initial developer of the meme, talking about Brandon’s post, and Mandy Michael tweeting about it circa 2018. Great deals of great history recorded in Chris’ post.