csscss icon indicating copy to clipboard operation
csscss copied to clipboard

Comments/charset declarations are included in selectors

Open tomdenbraber opened this issue 9 years ago • 0 comments

Hi,

I encountered the problem that the CSS parser includes comments in selector names. Example CSS:

/* A comment before a selector*/
h1 {
   /* 
     some redundant selectors here
     ...
   */ 
}

Let's assume h1 contains redundancy and ends up in the JSON structure. This JSON structure now contains a selector in the list called "/* A comment before a selector*/h1", while the correct selector is just "h1".

The same problem occurs when having a @charset declaration just before a selector.

Thanks in advance!

tomdenbraber avatar Dec 17 '15 10:12 tomdenbraber