How to write rule for list of CSS selectors

Jan 19, 2012 at 3:16 PM
Edited Jan 19, 2012 at 3:17 PM


I would like to ask you. Is it possible to write some rule for list of CSS selectors? For example I have following list:

frontAdmin .menu ul.leftMenu li.pc .pageTypes .item

each selector has to be represented by one node. So, I need 6 nodes. I tried to write some rules but I am not sure how to work with whitespaces between selectors. Is it not possible to write each selector on new line because we have a lot of big css files.

Thank you very much.




Feb 7, 2012 at 11:53 PM

don't quite understand what is the problem here. You should define a "selector" like this:

selector.Rule = identifier | identifier + "." + identifier;

selectorList.Rule = MakePlusRule(selectorList, selector);

cssExpr.Rule = identifier + selectorList + NewLine; 

Whitespaces are "swallowed" automatically by scanner. I don't know much about exact CSS format, so I'm not sure if I got it right. Is Line-break a meaningful terminator in CSS?