css4j logo


CSS4J provides a CSS object model API for the Java™ platform, closely related to the CSSOM and DOM APIs.


This software is released under a BSD-style license, although some individual files may have a different one (see LICENSES.txt in the distribution).

Building from Git

If you want to build css4j from the code that is currently at the Git repositories, you need a JDK version 12 or higher, and a copy of the CSS4J-distribution repository, then run the tree.sh script. For example:

  • git clone https://github.com/css4j/css4j-dist.git css4j-snapshot
  • cd css4j-snapshot
  • ./tree.sh

After running the script you'll have a tree with all the modules, ready to build with Maven (just run mvn). Note that one of the dependencies (JCLF) is not in Maven Central. Depending on your setup, you may need to install it manually first.

Community - Support

There is a general forum that can be used for css4j support, and the development forum is intended for discussions about patches and APIs.