Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Period in CSS, does it do anything?

Tags:

css

I'm dealing with someone else's code here and have come across something like this:

.selector {
 .background-position : 0px 2px;
}

Does the period on the line background-position do anything or was that their way of commenting the line out? It doesn't seem to have an effect that I know of (using chrome inspector and firefox inspector) but I want to make sure.

Thanks for any insight on this.

like image 370
AllisonC Avatar asked Dec 27 '22 20:12

AllisonC


1 Answers

I usually use a z to quickly comment stuff out. But in the production CSS, I remove these lines.

It's a "comment". It makes the CSS invalid though and it looks very unprofessional, so it's a good idea to remove it altogether if you don't need it, or at least properly comment it with /* ... */.

like image 65
rid Avatar answered Jan 23 '23 10:01

rid