zmoazeni/csscss

Comments/charset declarations are included in selectors

Opened this issue · 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!