I have recently started using //
to \"comment\" out single lines of CSS code. I understand that I am not actually commenting out the line; I am just breaking it
I use //
to 'comment out' lines in .css files all the time. Because it's bound to a shortcut in Vim, and I always forget what I am editing. In JavaScript it's really handy to comment out blocks of code, test the code, and 'comment in' the block of code again (shortcuts, yes).
But when I tidy op my .css file, I use the following constructs to more easily move declarations in and out of scope:
.pin {
/*
position: absolute;
background: url(buttons-3x3.png);
background-color: red;
*/
height:50px;
width:150px;
position: relative;
}
.shadow {
margin-top: 25px;
margin-left: 25px;
margin-left: 60px;
width:50px;
height:50px;
background: url(playground.png) -400px -100px;
position: relative;
position: absolute;
}
In .pin
I can remove a line and add it to the commented area and vice versa. In .shadow
I just redeclare the same property with a different value.
It's a pain.
!important