/** * Returns the parsable textual representation of the rule. * This reflects the current state of the rule and not its initial value. * @return the parsable textual representation of the rule. */ public String jsxGet_cssText() { return rule_.getCssText(); }
/** * Returns the parsable textual representation of the rule. * This reflects the current state of the rule and not its initial value. * @return the parsable textual representation of the rule. */ public String jsxGet_cssText() { return rule_.getCssText(); }
/** * Returns the parsable textual representation of the rule. * This reflects the current state of the rule and not its initial value. * @return the parsable textual representation of the rule. */ public String jsxGet_cssText() { return rule_.getCssText(); }
private void appendCSSText(CSSRule rule) { String cssText = rule.getCssText().trim(); // TODO nick - escape values if (cssText.length() != 0) { buffer.append(cssText); buffer.append(NEW_LINE); } }
/** * Returns the parsable textual representation of the rule. * This reflects the current state of the rule and not its initial value. * @return the parsable textual representation of the rule. */ @JsxGetter public String getCssText() { return rule_.getCssText(); }
/** * {@inheritDoc} */ @Override public String getCssText() { final StringBuilder sb = new StringBuilder("@media "); sb.append(((MediaListImpl) getMedia()).getMediaText()); sb.append(" {"); for (int i = 0; i < getCssRules().getLength(); i++) { final CSSRule rule = getCssRules().item(i); sb.append(rule.getCssText()).append(" "); } sb.append("}"); return sb.toString(); }
/** * {@inheritDoc} */ @Override public String getCssText(final CSSFormat format) { final StringBuilder sb = new StringBuilder("@media "); sb.append(((MediaListImpl) getMedia()).getMediaText(format)); sb.append(" {"); for (int i = 0; i < getCssRules().getLength(); i++) { final CSSRule rule = getCssRules().item(i); sb.append(rule.getCssText()).append(" "); } sb.append("}"); return sb.toString(); }
InputSource source = new InputSource( new StringReader( "h1 { background: #ffcc44; } div { color: red; }")); CSSOMParser parser = new CSSOMParser(new SACParserCSS3()); CSSStyleSheet sheet = parser.parseStyleSheet(source, null, null); CSSRuleList rules = sheet.getCssRules(); for (int i = 0; i < rules.getLength(); i++) { final CSSRule rule = rules.item(i); System.out.println(rule.getCssText()); }
+ " is not yet supported; rule content: '" + rule.getCssText() + "'"); break; default: LOG.warn("CSSRule " + rule.getClass().getName() + " is not yet supported; rule content: '" + rule.getCssText() + "'");