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 trialDot Rust
6,488 PointsWhen 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?
2 Answers
Tom Mertz
15,254 PointsIt 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!
Dot Rust
6,488 PointsThanks Tom and Hugo! That makes sense.
Hugo Paz
15,622 PointsHugo Paz
15,622 PointsHi Dot,
It is just for better readability.