Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does mean /*! some url or text */ in css [duplicate]

Tags:

comments

css

I know in CSS we use /* */ for comment text . But I see in some CSS use /*! some url or text */. What's different between /* text */ and /*! text */ ?

like image 825
farzad Avatar asked Feb 09 '17 08:02

farzad


People also ask

How do you comment out a line in CSS?

How to Comment in CSS. To comment in CSS, simply place your plain text inside /* */ marks. This tells the browser that they are notes and should not be rendered on the front end.

How do you comment in style tag?

Comments in CSS can be added by using the /* tag, which is then closed off by using */ . Note: Code that is commented out is not used to style the page. This technique can be used to add both single and multi-line comments.


1 Answers

The exclamation mark is to keep an comment important . This comment will not be deleted while compressing. This is important e.g. for keep a licence in a CSS file after compressing. Uglify or YUICompressor will keep that comment after compressing.

/*! important comment will not be deleted while compressing */ 
like image 162
lin Avatar answered Dec 24 '22 11:12

lin