If you can, then imagine a world where there is no styling in websites. It's close to impossible, right?
Being in the frontend industry for quite some time, it's very hard to not use CSS in a project. I mean, one of the foundations of a website you create is CSS! Having no CSS is like living a faded life. No excitement, no moods, no emotions, just a straight-up structure with some content in it.
Some backstory (if you like...) /_ \
This is completely a different article of what I usually write on a weekly basis. I stumbled upon this topic a week ago when I was browsing some resources for my upcoming newsletter. Due to some reason a link opened after quite a long time.
Turns out, the server was really slow to respond. I thought maybe it's a browser issue, so I switched from Chrome to Firefox. The same happened. I opened dev tools to see if there are some errors which I can take a look on. There was nothing I could possibly do as some of the errors were out of my head.
Then I started experimenting (you can blame my curious mind for this). I opened up the Settings and tried to fiddle with things like:
- Turning off some extensions.
- Enabling service workers.
- Recording a performance analysis in the Network tab.
- Disabling JavaScript. 👀
And more such things.
That sudden idea! (ノへ ̄、)
Out of (I don't know what) curiosity, I started searching for "Disable CSS in Firefox". Well, I think that it was because of that last point stated above. I tried to disable JS, the page reloads, and still, the website wasn't opening (please don't ask what website that was, it was a pain to remember the name as it was in a foreign language).
I got to know that you can do this in Firefox by hitting the alt key, then v -> y -> and finally n. Basically this...
This activates the "No Style" mode in Firefox so the page you're currently on has no CSS style sheet rules in it. Of course, that horrible website even now couldn't load properly. So I gave up on that and did something weird next...
Turning OFF CSS on top websites (#_<-)
Yes, I did this. I visited some of the most popular websites on Earth to just explore how they would look. Of course, I knew they would look bad, but how bad?
This bad 🙂
⚠ WARNING! DISGUSTING AND UGLY WEBSITES AHEAD. SCROLL AT YOUR OWN RISK. ALTHOUGH I KNOW 99% OF YOU'RE GONNA SCROLL SO JUST GET STARLIGHT INTO IT! 😈
1️⃣ Wikipedia
Eheheh, funny but here are some of the things I got to know about it.
- The use of
font-family: sans-serif
is heavy throughout the body as it's usually a text-based content website. - The
line-height: 1.6
plays an important role to have a clear read of its content. - They use quite a LOT of borders.
2️⃣ Amazon
Key takeaways:
- The immediate thing you notice is the extensive use of the carousels they use to showcase some products. So here, properties like
width
,transform
, andheight
play a great role. - For the categories section, they're using the grid display.
3️⃣ Yelp
Key takeaways:
- Apart from good use of SVGs, the
background-image
property makes the difference here. - The form uses some pseudo-classes,
position: relative
andabsolute
. - Centre-aligned text is important!
4️⃣ IMDb
Key takeaways:
- In the navigation, there is a good use of
padding
. - Surprisingly, the entire IMDb logo is made up of SVG elements which obviously used
width
,heigh
,transform
properties. - Again, for the anchor tags, there is padding everywhere.
5️⃣ Fandom
Key takeaway:
Can't tell much due to the integrated use of some CSS framework or library of whatever...but, yes, the buttons having an SVG do have transform: rotate(0)
properties.
But why? ╰(‵□′)╯
Before you start thinking, "Why the hell he turned off CSS?" I want to tell you that I did this 'experiment' kind of thing to clear out two things:
First, a CSS framework or not, PLEASE DO NOT UNDERESTIMATE THE SHEER POWER OF CASCADING STYLE SHEETS! Make it a habit for using pure CSS in your learning, you have no idea how many CSS properties you are not using!
Second, well, if you take a look at some of the CSS properties discussed above, you get to know that THESE CSS PROPERTIES ARE HEAVILY USED AND MAKE SURE YOU KNOW HOW AND WHERE TO USE THEM.
Where to next? 🤔
I turned off CSS, you might have turned off JS way before but how about you turn off HTML now? Well, of course, if you take this seriously, then there will be nothing to critique...or to learn.
But yes, as I said, learn CSS with your heart, give it the same importance as you give to JavaScript. I love it, that's why I wrote this article. Look how bad the internet looks without CSS. It's just unusable...
Thanks for reading, I appreciate it! Have a good day. (✿◕‿◕✿)
Why was she disappointed? 😂
— Coding Interview Coach (@CoachCoding) August 5, 2020
.
#coding #developer #webdevelopment #iosdevelopment #javadevelopment #java #python #ruby #php #html #javascript #codingmeme #codingjoke #developerhumor #devhumor #devhumour #programmerhumor #programmingmeme #programmingjoke pic.twitter.com/rfbrh4KBgG
CSS
is like soul to a website. It's impossible imagine a modern site without It.