Search in sources :

Example 1 with Block

use of org.eclipse.mylyn.wikitext.parser.css.Block in project mylyn.docs by eclipse.

the class CssParserTest method testComments.

public void testComments() {
    Stylesheet stylesheet = parser.parse("tr { /* font-size: 115%; */ font-size: 100%; } /* foo { sdf: sdf; } */");
    List<Block> blocks = stylesheet.getBlocks();
    assertEquals(1, blocks.size());
    Block block = blocks.get(0);
    List<CssRule> rules = block.getRules();
    assertEquals(1, rules.size());
    CssRule rule = rules.get(0);
    assertEquals("font-size", rule.name);
    assertEquals("100%", rule.value);
}
Also used : CssRule(org.eclipse.mylyn.wikitext.parser.css.CssRule) Block(org.eclipse.mylyn.wikitext.parser.css.Block) Stylesheet(org.eclipse.mylyn.wikitext.parser.css.Stylesheet)

Aggregations

Block (org.eclipse.mylyn.wikitext.parser.css.Block)1 CssRule (org.eclipse.mylyn.wikitext.parser.css.CssRule)1 Stylesheet (org.eclipse.mylyn.wikitext.parser.css.Stylesheet)1