This question already has an answer here:
- Single-line vs multi-line CSS formatting 5 answers
I know this is probably a trivial question, but I couldn't find anything on Google.
Is there any point in CSS where it's required to have a new line? For example, I have the following block of code:
#headertitle {
background: -o-linear-gradient(left, #3fd0e4 0%,#18709f 100%); /* Opera 11.10+ */
background: linear-gradient(to right, #3fd0e4 0%,#18709f 100%); /* W3C */
width:950px;
height:150px;
font-family:rw_SegoePrint_bold,'Segoe Print',OpenSansRegular,Verdana,sans-serif;
font-size:140px;
text-align:center;
position: absolute;
left: 50%;
top: 10px;
margin-left:-475px;
z-index:2;
}
I can simply remove the new lines to end up with #headertitle{background:-o-linear-gradient(left, #3fd0e4 0%,#18709f 100%);background: linear-gradient(to right, #3fd0e4 0%,#18709f 100%);width:950px;height:150px;font-family:rw_SegoePrint_bold,'Segoe Print',OpenSansRegular,Verdana,sans-serif;font-size:140px;text-align:center;position:absolute;left:50%;top:10px;margin-left:-475px;z-index:2;} and it still parses perfectly, as I would've expected. However, are there any instances in CSS coding that definitely require a new line to be present? Or am I okay to just replace "
" with "" (using PHP)?
</div>