StyleSheetRenderer renderer = CSSStyleSheetRenderer.getSingleton();
try {
MutableStyleProperties properties =
ThemeFactory.getDefaultInstance().createMutableStyleProperties();
properties.setStyleValue(property, value);
renderer.renderStyleProperties(properties, context);
context.flushStyleSheet();
rendered = writer.toString();
int firstColon = rendered.indexOf(':');
if (firstColon > 0) {
rendered = rendered.substring(firstColon + 1);