All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rules.scsslint.PropertyUnits.html Maven / Gradle / Ivy

Go to download

Consume reports generated by scsslint for code quality. Also consume reports for code duplication (either simian or cpd). The information generated by reports are added in Sonar

There is a newer version: 2.1.0
Show newest version

Details

Configure which units are allowed for property values.

By default a value may have any kind of unit. You can adjust which units are allowed globally by setting the global option. Alternately, you can specify a list of units for a single property by adding it to the properties option, e.g.

PropertyUnits:
global: ['em', 'rem', '%'] # Allow relative units globally
properties:
border: ['px'] # Only pixels
line-height: [] # No units allowed
margin: ['em', 'rem']

With the above configuration, the following issues would be reported:

p {
border: 1rem solid blue; // rem not in `border` list
line-height: 55px; // px not in `line-height` list
padding: 10px; // px not in `global` list
margin: 10%; // % not in `margin` list
}
Configuration Option Description
global List of allowed units (by default any unit is allowed)
properties Hash of property names and their list of allowed units. (empty by default)




© 2015 - 2025 Weber Informatics LLC | Privacy Policy