Is CSS the hardest language?

No logical or Conditional functions required…


Normally a website built upon several web languages such as HTML, CSS, JavaScript, jQuery, PHP etc… Among all these languages, we may all agree that CSS is the easiest language. It’s pretty simple. It just gives shapes, changes color, font size, typography etc. It’s straight forward and doesn’t require any logical or conditional functions. Like writing English…

But you might be surprised to know that CSS could be the hardest language and very troublesome.
Here are some of the reasons :

NO ERROR REPORT

Each and every web language follows specific rules. Many languages, strictly regulate the rules Otherwise, it will give you a bunch of errors. But not CSS. CSS doesn’t output errors. A single unintentionally bracket or semicolon makes a huge difference and break whole layout.

Of course in other languages, protocol is same. One mistake can ruin very much. But it will break the functionality. It won’t break whole layout.

In many languages, you will notified where the error is and on which line. Whereas in CSS you need to find silly mistake all on your own. Even if it across multiple CSS files and thousands of lines of code.

CSS Specificity

CSS specificity is really confusing. We need to be very attentive and accurate when defining style rules. Otherwise it can be over-ridden with other styles. There might be one selector with a higher specificity which overwrites less-specific selectors, leaving you searching for the culprit for hours before locating it.

Browser Compatibility

The most common problem for all designers. Before creating any animation or shape in CSS. We need to think about compatibility with various browsers. Sometimes it shows the yellow outline around search bar. Sometimes it shows red.

When support for older browsers (like IE6 and IE7) is required – usually on a client’s demand – we could end up having to create multiple files and serve it through a conditional statement, then doing a bunch of CSS hacks to make the site look consistent and similar viewed on most modern browsers. At the end of the day, problem #1 will keep us trapped in this nightmare.

CSS vs Your client

Our client’s demands are unique. Sometimes its countless. And CSS defines website layout. Sometimes they need big, sometimes too small. Sometimes they need a circle with animations, sometimes they need a triangle with filters.

So again we are in above mentioned problems. And again we need to come out of those things. It’s like to swim under the water with sharks.

May affect on performance

As you all know, CSS plays much role on page load and site performance. Sometimes we need to add tons of animations which results in slow page load and effects on performance of the site. There are several practices, we need to follow those to write better CSS. So bad written CSS won’t give you error here, but it will affect in other ways.


So I’m repeating my question again.
Is CSS a hardest language?

It’s easy to learn, but we need to follow a certain format to make it easier to design and develop.
Happy Coding.

Email me when Developer’s Life publishes stories