* @return Whether the setting of the value was successful.
*/
public static boolean setValue(final File cssFile, final String selector,
final String property, final String newValue, final String priority) {
boolean success = false;
final CSSStyleSheet styleSheet = getStyleSheet(cssFile);
final List<CSSStyleRule> rules = getRules(styleSheet);
final Optional<CSSStyleDeclaration> styleMaybe = getStyle(rules,
selector);
if (styleMaybe.isPresent()) {
final CSSStyleDeclaration style = styleMaybe.get();
style.setProperty(property, newValue, priority);
success = IOUtil.write(styleSheet.toString(), cssFile);
}
return success;
}