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 Unused CSS Stages CSS Animations Full-Page Animation Project: Part 1

When declaring the 'from' and 'to' values, a space is inserted after the first and before the last curly bracket. Why?

Is this a convention, personal preference, or a functional necessity?

Hugo Paz
Hugo Paz
15,622 Points

Hi Dot,

It is just for better readability.

2 Answers

Tom Mertz
Tom Mertz
15,254 Points

It is a bit of the first two. It just makes the code a little cleaner and easier to read. In CSS, whitespace (spaces, tabs, enters, etc) is ignored by the browser.

Some sites even put their code through 'minifiers' that take all the extra spaces out to make the file as small as possible. But only after the developers don't have to read it anymore!

Thanks Tom and Hugo! That makes sense.