Frontend Development

.CSS Extra [Trick]

Submitted by donscream, , Thread ID: 11495

Thread Closed
19-10-2015, 05:31 PM
#1
Some times you see
Code:
// text here

You see in a .css ( // ) that means it is text with explaining what it does or a remember that developers know easy how or what to do.

Well if you don't need to edit it anymore then you just can delete is.....
Code:
// Example text
body{background-color:#d0e4fe;}
h1{color:orange;text-align:center;}
p{font-family:"Times New Roman";font-size:20px;}

So removing it will be just like this.
Code:
body{background-color:#d0e4fe;}
h1{color:orange;text-align:center;}
p{font-family:"Times New Roman";font-size:20px;}

RE: .CSS Extra [Trick]

#2
I didn't understand exactly what you mean, would you explain in more detail.

RE: .CSS Extra [Trick]

#3
// This is a comment

It's not really CSS, it's just text that you can freely write, and it doesn't affect the code.
[Image: InZ3hGx.png]

RE: .CSS Extra [Trick]

#4
Another - A bit cooler version to comment :yay:
[Image: abC7LCk.png]

RE: .CSS Extra [Trick]

#5
I don't think that commenting your CSS is necessary but everyone's opinion is different in this case thanks eitherway!

RE: .CSS Extra [Trick]

#6
21-10-2015, 09:00 PM
Dreadzone Wrote:
I don't think that commenting your CSS is necessary but everyone's opinion is different in this case thanks eitherway!

Will get useful when you don't want to use a part of code, i.e you want to create a responsive web page without two different css files :yus:

RE: .CSS Extra [Trick]

#7
21-10-2015, 09:03 PM
Aeux Wrote:
21-10-2015, 09:00 PM
Dreadzone Wrote:
I don't think that commenting your CSS is necessary but everyone's opinion is different in this case thanks eitherway!

Will get useful when you don't want to use a part of code, i.e you want to create a responsive web page without two different css files :yus:

You're right and I won't argue on that, thanks eitherway it's really usefull for people who are good with this [ I'm not that good ;c ]

RE: .CSS Extra [Trick]

#8
21-10-2015, 09:04 PM
Dreadzone Wrote:
21-10-2015, 09:03 PM
Aeux Wrote:
21-10-2015, 09:00 PM
Dreadzone Wrote:
I don't think that commenting your CSS is necessary but everyone's opinion is different in this case thanks eitherway!

Will get useful when you don't want to use a part of code, i.e you want to create a responsive web page without two different css files :yus:

You're right and I won't argue on that, thanks eitherway it's really usefull for people who are good with this [ I'm not that good ;c ]

Haha, cool :hurr:
Just keep on coding and you'll get in pretty easily. :yus:

RE: .CSS Extra [Trick]

#9
Since when is // valid in css? Rly people? omg :fp:

RE: .CSS Extra [Trick]

#10
21-10-2015, 09:08 PM
Kill Wrote:
Since when is // valid in css? Rly people? omg :fp:

Don't have much knowledge when it comes to CSS but I think that it's been there for a while now ( Or since today ). But I won't argue about that because that's far beyond my knowlegdge plus that I've never used it.

Users browsing this thread: 2 Guest(s)