Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Richard Nash
Richard Nash
24,862 Points

What is CSS...made of?

Odd question, I suppose, but...what is CSS made of?

Is it it's own language that compiles at run time?

Is it a sugaring layer over C, or C++ or Javascript even?

Is it something else entirely?

Just curious to dive deeper into how CSS actually does what it does. I'm learning about apple's VFL and thegrid.io's GSS, which are both super interesting. So anyhoo...

thanks in advance :-)

Richard

Dor Bar
Dor Bar
8,410 Points

Yes, CSS is a language like HTML is a language.

The CSS stands for Cascading Style Sheet and it used for styling HTML files, it made to make the developer work easier by separating the styles from the content of the page.

3 Answers

It's not compiled, it's a design language. It's interpreted by your web browser to apply styles (i.e. to HTML).

Alexander Costa
Alexander Costa
11,464 Points

Hey Richard!

It is something else entirely!

CSS is not compiled like C++ or Java.

JavaScript is not compiled like C++ or java, its interpreted.

And CSS is not a Markup language its a Style Sheet Language

CSS is visual representation and manipulation of the DOM in a browser engine.

Richard Nash
Richard Nash
24,862 Points

I've read elsewhere that javascript is in fact compiled, but complied just-in-time, which is apparently a little bit different than being truly interpreted, but I do not fully understand the difference at this point. As far as my understanding is concerned, compiling just-in-time improves performance by dynamically converting the high level code to machine code, and then running it, rather then, well, i'm not sure...

Richard Nash
Richard Nash
24,862 Points

So CSS is it's own language, and not anything else, then, I gather. A styling language, similar to Apple's Auto Layout or thegrid.io's GSS which are both based upon the Cassowary Constraint Solver (this is a javascript port by Alex Russell).

Is it interpreted or compiled just-in-time? I want to learn more about WHAT CSS is, and not how to use CSS, which I know too much about already. I guess I want to know how browsers add CSS modules and implement them in the browser, etc... so I desire to know and understand more about how the computer works, maybe, I'm not sure...

Thank you, though, everybody :-)