• 1.3

W3C CSS Java Validator

Validate your CSS against W3C Jigsaw validator with this code:

public class My {
  public void main() {
    String css = "body { font-family: Arial; }";
    ValidationResponse response =
      new ValidatorBuilder().css().validate(css);
    assert response.valid();
  }
}

Similar mechanism is available for HTML local validation and HTML remote validation.

All events are logged through slf4j, using "com.jcabi.w3c" logger. If you want to see them, just add proper binding to classpath, as explained in SLF4J manual.