Frontend Development

.CSS Extra [Trick]

Submitted by donscream, , Thread ID: 11495

Thread Closed
donscream
Novice
Level:
0
Reputation:
0
Posts:
30
Likes:
0
Credits:
0
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]

mathew
Active Member
Level:
0
Reputation:
6
Posts:
263
Likes:
7
Credits:
190
20-10-2015, 09:23 AM
#2
I didn't understand exactly what you mean, would you explain in more detail.

RE: .CSS Extra [Trick]

Faded
Legend
Level:
21
Reputation:
215
Posts:
10.2K
Likes:
1.12K
Credits:
15K
20-10-2015, 03:07 PM
#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]

Aeux
vittu
Level:
0
Reputation:
42
Posts:
577
Likes:
41
Credits:
72
21-10-2015, 08:58 PM
#4
Another - A bit cooler version to comment :yay:
[Image: abC7LCk.png]

RE: .CSS Extra [Trick]

Dreadzone
Closed Account
Level:
0
Reputation:
5
Posts:
125
Likes:
3
Credits:
43
21-10-2015, 09:00 PM
#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]

Aeux
vittu
Level:
0
Reputation:
42
Posts:
577
Likes:
41
Credits:
72
21-10-2015, 09:03 PM
#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]

Dreadzone
Closed Account
Level:
0
Reputation:
5
Posts:
125
Likes:
3
Credits:
43
21-10-2015, 09:04 PM
#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]

Aeux
vittu
Level:
0
Reputation:
42
Posts:
577
Likes:
41
Credits:
72
21-10-2015, 09:06 PM
#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]

Coin
Level:
0
Reputation:
59
Posts:
1.13K
Likes:
54
Credits:
243
21-10-2015, 09:08 PM
#9
Since when is // valid in css? Rly people? omg :fp:

RE: .CSS Extra [Trick]

Dreadzone
Closed Account
Level:
0
Reputation:
5
Posts:
125
Likes:
3
Credits:
43
21-10-2015, 09:11 PM
#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: 1 Guest(s)