List<Object> parseImpl(String content) throws GadgetException {
List<Object> parsedCss = Lists.newArrayList();
CharProducer producer = CharProducer.Factory.create(new StringReader(content),
new InputSource(DUMMY_SOURCE));
CssLexer lexer = new CssLexer(producer);
try {
StringBuilder builder = new StringBuilder();
boolean inImport = false;
while (lexer.hasNext()) {
Token<CssTokenType> token = lexer.next();
if (token.type == CssTokenType.SYMBOL && token.text.equalsIgnoreCase("@import")) {
parsedCss.add(builder.toString());
builder.setLength(0);
inImport = true;
} else if (inImport) {