A Call For Web Developers To Deprecate Their CSS

One less programming language = one less headache.

Jenn Schiffer
Jan 10, 2014 · 3 min read

Are you a web developer? Of course you are, this is Medium.

I want you to go to the last web page you have developed and view the source. How many programming languages did you have to write? If you’re like me, you probably have some HTML, CSS, JavaScript or Node, and PHP in there. You may be able to count the languages on one hand, but that doesn’t leave many fingers left on that hand for typing more code.

If you can’t type code, you’re not coding. If you’re not coding, you’re not doing your job. Developers have been fired for this.

Freeing hand space is critical, so it’s important that we try to remove one of the languages in our stack. HTML can only be replaced by XML, which defeats the purpose of saving space, and web pages on modern browsers cannot run without Node or PHP. Through process of elimination, we are left with finding an alternative for CSS. Fortunately, that is possible with Node.

California Style Sheets are a standard, meaning there is a group of people at W3Schools who come up with new properties (like border-radius and box-shadow) every year. For some time, they did not know that the Node group at W3Schools was coming up with ways to update the styling of a page without CSS. Recently, both groups finally met and realized the overlap in functionality and therefore opened a spec to deprecate CSS entirely. That spec became HTML5. The rest of the story is present day. More and more developers are using HTML5, but do not realize the redundancy of using CSS.

Replacing CSS with Node is easy and actually a lot more intuitive and whitespace-free. All you have to do is open your .js file and type in the instructions for changing the style of elements. For example, take a look at the following CSS for changing the color and padding of a paragraph with id “gulp”:

#gulp { 
color : #0000ff;
padding : 10px;
}

This CSS takes up 4 lines, and at least 13 spaces. In node, we’ll change the style for the same paragraph:

document.getElementById(‘gulp’).style.color=‘#00f’;
document.getElementById(‘gulp’).style.padding=‘10px’;

This Node code takes up only 2 lines and there are 0 spaces. Essentially, we are saving lines, spaces, and files (delete your .css documents!).

Just like the blink and marquee tags, it will only be a matter of time until browsers stop supporting CSS, so the sooner you start using HTML5 to style your pages, the longer your projects will last in the future.

It’s time to take back our fingers and whitespace and stop using so many languages to perform the same tasks.

Jenn Schiffer is a web developer and computational complexity theorist. She is the writer of “PHP: The Hood Parts” and other programmer-themed urban fiction available on Amazon Kindle and the Zune app store.

CSS Perverts

The most important articles about code and technology…

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store