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 trialNatalia P.
353 Pointscss comments and /* insider jokes */
do any of you geeks know if the css comments are used for making commentary used to communicate to other web developers who might take a peek at the source code?
maybe they're leaving a comment as a joke, or maybe to communicate actually relevant information?
2 Answers
eck
43,038 PointsI have not seen anything memorable in css comments as far as jokes or "easter eggs" go, but it is not unheard of to see things like ascii art placed within html source.
James Barnett
39,199 PointsComments are used for relevant information. If you were looking through a template or some other code meant to be modified then highly maintainable code should include relevant comments.
You won't always see them on websites by using the view source
option in your browser.
The reason for this is because CSS and JavaScript should be minified to remove unnecessary whitespace and comments. On a website with tens of thoundsands of lines of CSS and hundreds of thousands of hits by minifing your code you get a significant amount of bandwidth savings.
Natalia P.
353 PointsNatalia P.
353 Pointscool, I like the phrase "easter eggs" used in this context.