HighDots Forums  

Can't a CSS file start with a comment to be validated?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Can't a CSS file start with a comment to be validated? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
shapper
 
Posts: n/a

Default Can't a CSS file start with a comment to be validated? - 03-02-2008 , 08:41 AM






Hello,

I was validating an HTML page CSS with http://jigsaw.w3.org/css-validator/
and I got multiple errors.

The problem was that I my CSS seemed fine and I was not getting any
detail about the errors.

Then I removed the comment I had on the start of each CSS file and all
the errors disappeared.

Can't a CSS file start with a comment to be validated?

.... I have seen many CSS documents that start with a comment.

Thank You,
Miguel

Reply With Quote
  #2  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Can't a CSS file start with a comment to be validated? - 03-02-2008 , 09:02 AM






shapper wrote:
Quote:
Hello,

I was validating an HTML page CSS with http://jigsaw.w3.org/css-validator/
and I got multiple errors.

The problem was that I my CSS seemed fine and I was not getting any
detail about the errors.

Then I removed the comment I had on the start of each CSS file and all
the errors disappeared.

Can't a CSS file start with a comment to be validated?
Sure it can. How did you comment? Hint: CSS is *not* HTML.

/* a CSS valid comment */

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #3  
Old   
shapper
 
Posts: n/a

Default Re: Can't a CSS file start with a comment to be validated? - 03-02-2008 , 09:15 AM



On Mar 2, 3:02 pm, "Jonathan N. Little" <lws4... (AT) central (DOT) net> wrote:
Quote:
shapper wrote:
Hello,

I was validating an HTML page CSS withhttp://jigsaw.w3.org/css-validator/
and I got multiple errors.

The problem was that I my CSS seemed fine and I was not getting any
detail about the errors.

Then I removed the comment I had on the start of each CSS file and all
the errors disappeared.

Can't a CSS file start with a comment to be validated?

Sure it can. How did you comment? Hint: CSS is *not* HTML.

/* a CSS valid comment */

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com
I created a simple CSS file in Visual Studio which creates a text file
with extension css.

My file code is:

..empty{}

/*
Base
Global styling rules
Date: 01-03-2008
*/

body
{
color: #606060;
font-family: arial, verdana, helvetica, sans-serif;
}

The empty class is just something I added to check if the file is
validated and it is.

Do you want me to upload the CSS file to my server?

The way I validated was:
1. Ran MyPage.aspx
2. Used Firefox, Developer Bar > Tools > Validate Local CSS

The HTML is validated fine. The CSS is only validated if I add the
style at the beginning.

Thank You,
Miguel





Reply With Quote
  #4  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Can't a CSS file start with a comment to be validated? - 03-02-2008 , 09:39 AM



shapper wrote:

Quote:
I created a simple CSS file in Visual Studio which creates a text file
with extension css.

My file code is:

.empty{}

/*
Base
Global styling rules
Date: 01-03-2008
*/

body
{
color: #606060;
font-family: arial, verdana, helvetica, sans-serif;
}

The empty class is just something I added to check if the file is
validated and it is.

Do you want me to upload the CSS file to my server?

The way I validated was:
1. Ran MyPage.aspx
2. Used Firefox, Developer Bar > Tools > Validate Local CSS

The HTML is validated fine. The CSS is only validated if I add the
style at the beginning.

http://jigsaw.w3.org/css-validator/v...m%2Fstudio.php
W3C CSS Validator results for http://www.littleworksstudio.com/studio.php

Some warnings for not specifying background-color on my navbar links
that I have preset...but as you can see how they start:

http://www.littleworksstudio.com/styles/basic.css

Maybe if we could see the live example, the actual output might reveal
the error...So you're Visual Studio must be throwing in something else
that make the file invalid. A MS product that would produce
non-compliant code? Perish the thought!

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #5  
Old   
shapper
 
Posts: n/a

Default Re: Can't a CSS file start with a comment to be validated? - 03-02-2008 , 10:06 AM



On Mar 2, 3:39 pm, "Jonathan N. Little" <lws4... (AT) central (DOT) net> wrote:
Quote:
shapper wrote:
I created a simple CSS file in Visual Studio which creates a text file
with extension css.

My file code is:

.empty{}

/*
Base
Global styling rules
Date: 01-03-2008
*/

body
{
color: #606060;
font-family: arial, verdana, helvetica, sans-serif;
}

The empty class is just something I added to check if the file is
validated and it is.

Do you want me to upload the CSS file to my server?

The way I validated was:
1. Ran MyPage.aspx
2. Used Firefox, Developer Bar > Tools > Validate Local CSS

The HTML is validated fine. The CSS is only validated if I add the
style at the beginning.

http://jigsaw.w3.org/css-validator/v...s2&warning=2&u....
W3C CSS Validator results forhttp://www.littleworksstudio.com/studio.php

Some warnings for not specifying background-color on my navbar links
that I have preset...but as you can see how they start:

http://www.littleworksstudio.com/styles/basic.css

Maybe if we could see the live example, the actual output might reveal
the error...So you're Visual Studio must be throwing in something else
that make the file invalid. A MS product that would produce
non-compliant code? Perish the thought!

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com
Yes, I found that when it starts with a comment or empty line the CSS
files gets the following characters at the start:



Have no idea why. Going to try to find out why.

Thanks,
Miguel


Reply With Quote
  #6  
Old   
shapper
 
Posts: n/a

Default Re: Can't a CSS file start with a comment to be validated? - 03-02-2008 , 10:17 AM



On Mar 2, 4:06 pm, shapper <mdmo... (AT) gmail (DOT) com> wrote:
Quote:
On Mar 2, 3:39 pm, "Jonathan N. Little" <lws4... (AT) central (DOT) net> wrote:



shapper wrote:
I created a simple CSS file in Visual Studio which creates a text file
with extension css.

My file code is:

.empty{}

/*
Base
Global styling rules
Date: 01-03-2008
*/

body
{
color: #606060;
font-family: arial, verdana, helvetica, sans-serif;
}

The empty class is just something I added to check if the file is
validated and it is.

Do you want me to upload the CSS file to my server?

The way I validated was:
1. Ran MyPage.aspx
2. Used Firefox, Developer Bar > Tools > Validate Local CSS

The HTML is validated fine. The CSS is only validated if I add the
style at the beginning.

http://jigsaw.w3.org/css-validator/v...s2&warning=2&u....
W3C CSS Validator results forhttp://www.littleworksstudio.com/studio.php

Some warnings for not specifying background-color on my navbar links
that I have preset...but as you can see how they start:

http://www.littleworksstudio.com/styles/basic.css

Maybe if we could see the live example, the actual output might reveal
the error...So you're Visual Studio must be throwing in something else
that make the file invalid. A MS product that would produce
non-compliant code? Perish the thought!

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com

Yes, I found that when it starts with a comment or empty line the CSS
files gets the following characters at the start:



Have no idea why. Going to try to find out why.

Thanks,
Miguel
The symbol is ï » ¿

Without the spaces ... but now I see that is not VS.
It seems to be the View CSS tool of the Firefox developer bar.


Reply With Quote
  #7  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Can't a CSS file start with a comment to be validated? - 03-02-2008 , 11:43 AM



shapper wrote:

Quote:
Yes, I found that when it starts with a comment or empty line the CSS
files gets the following characters at the start:



Have no idea why. Going to try to find out why.
Curse of the BOM

http://www.google.com/search?hl=en&s...racter&spell=1
BOM character - Google Search


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #8  
Old   
Blinky the Shark
 
Posts: n/a

Default Re: Can't a CSS file start with a comment to be validated? - 03-02-2008 , 03:20 PM



Jonathan N. Little wrote:

Quote:
Curse of the BOM
I rented that last week. It's almost as bad as "Plan 9 From Outer Space".


--
Blinky
Killing all posts from Google Groups
The Usenet Improvement Project: http://improve-usenet.org
Blinky: http://blinkynet.net



Reply With Quote
  #9  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Can't a CSS file start with a comment to be validated? - 03-02-2008 , 04:09 PM



Blinky the Shark wrote:
Quote:
Jonathan N. Little wrote:

Curse of the BOM

I rented that last week. It's almost as bad as "Plan 9 From Outer Space".

That is one I haven't seen. Such a cult following I should see it just
for context.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #10  
Old   
Blinky the Shark
 
Posts: n/a

Default Re: Can't a CSS file start with a comment to be validated? - 03-02-2008 , 04:31 PM



Jonathan N. Little wrote:

Quote:
Blinky the Shark wrote:
Jonathan N. Little wrote:

Curse of the BOM

I rented that last week. It's almost as bad as "Plan 9 From Outer Space".


That is one I haven't seen. Such a cult following I should see it just
for context.
Oh, absoLOOTly! Carefuly watch for mundane objects dressed up to look
like futuristic technology. Example: on a table that represents, IIRC,
the communications center, along with some old radio gear, is one of those
highway flashers that typically hooked onto a barracade sawhorse and
consisted of a flattish two-sided round plastic lens that was attached to
the top of a big rectangular battery. But so you won't recognize it as
such, they've laid an X across the round lens with a couple pieces of
gaffers tape.

And it's got Vampira.

And cardboard headstones in the cemetary, that move around when someone
walks past them.

What's not to love?

Rent it. Rent it now. Report back!


--
Blinky
Killing all posts from Google Groups
The Usenet Improvement Project: http://improve-usenet.org
Blinky: http://blinkynet.net



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.