Hacker News new | ask | show | jobs
by wr1472 5319 days ago
> CSS doesn't have any comments

Am I missing something? How is this relevant to the functionality of the site?

2 comments

I'm no expert in webdev, but while CSS comments may be useful for maintenance and for new team members, they are also a waste of bandwidth. I'm honestly curious, what HN webdevs do with comments in CSS - do you use them, or not, or maybe have some deployment scripts that strip comments off?
Ideally, you would use a tool like less or sass to generate your css (which we don't), so your comments would be in the underlying file but not in the css given to the user.
Of course web devs use them, but like you said it's a waste of bandwidth so the production version should be minified and combined.
Maybe it's useful to support the site, while it's small it's ok, wait 2 more years... We are a very Tech centric community you should expect that kind of comment from HN folks.