Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Java CSS HTML Shell
Branch: master
Pull request Compare This branch is 407 commits ahead of kalidasya:master.

SonarQube CSS Plugin

Build Status

Project homepage:

Issue tracking:

CI builds:



This plugin enables code QA analysis of CSS source code within SonarQube:

  • Computes metrics: lines of code, number of CSS rules, complexity, etc.
  • Validates your CSS code
  • Performs more than 50 checks such as: Stylesheets should not contain too many selectors, Empty declarations should be removed, Box model size should be carefully reviewed, etc.


Getting started in two minutes

Download the package and follow the instructions of the README file. This package contains the SonarQube server with the CSS plugin, the analyzer (SonarQube Runner) and a sample project.

Installing and configuring your SonarQube platform from scratch

  1. Install SonarQube
  2. Install the CSS plugin either by a direct download or through the update center.
  3. Install your favorite analyzer (SonarQube Runner, Maven, etc.) and analyze your code.



Number of rules.


The following elements increment the complexity by one:

  • Class selector
  • ID selector
  • Attribute selector
  • Type selector
  • Pseudo-class selector
  • At-rule


It computes the complexity/rule, meaning the average number of selectors per rule.

It gives a measurement on how specific the selectors are.

As the computation of complexity in the CSS plugin is still in its early stage, it can be turned off if necessary at global and project levels.

Something went wrong with that request. Please try again.