CSS rules
tx0 checks .css, .scss and .less files with 83 rules, 23 of them in the default tier. Files that say a tool generated them are skipped. Each rule's page explains what it finds and what it leaves alone.
Default: 23 rules
Bugs and security problems with measured precision. They run without a tx0.toml.
-
tx0/css:color-function-argumentsdefaultA color function has the wrong number of components
-
tx0/css:css-expressiondefaultA value runs script through expression()
-
tx0/css:double-slash-commentdefaultA line comment in plain CSS breaks the rule after it
-
tx0/css:empty-selector-in-listdefaultA selector list has an empty entry
-
tx0/css:empty-valuedefaultA declaration has no value
-
tx0/css:font-face-missing-descriptordefaultAn @font-face lacks font-family or src
-
tx0/css:fractional-z-indexdefaultA z-index is not an integer
-
tx0/css:grid-areas-not-rectangulardefaultGrid template areas are not a rectangle of rectangular areas
-
tx0/css:important-in-keyframesdefaultA declaration in a keyframe is marked important and ignored
-
tx0/css:invalid-keyframe-selectordefaultA keyframe selector is not from, to or a percentage
-
tx0/css:late-charsetdefaultAn @charset is not at the start of the file and is ignored
-
tx0/css:late-importdefaultAn @import comes after other rules and is ignored
-
tx0/css:legacy-gradient-directiondefaultA linear gradient gives its direction without to
-
tx0/css:malformed-charsetdefaultAn @charset is not written in the one form browsers read
-
tx0/css:missing-semicolondefaultA declaration runs into the next because a semicolon is missing
-
tx0/css:negative-value-not-alloweddefaultA property that takes no negative values is set to one
-
tx0/css:parent-selector-at-rootdefaultA top-level SCSS rule refers to a parent selector
-
tx0/css:script-url-in-cssdefaultA url() in a stylesheet holds a javascript: URL
-
tx0/css:unitless-lengthdefaultA length is given as a number without a unit
-
tx0/css:unitless-timedefaultA duration or delay has no unit
-
tx0/css:unknown-unitdefaultA value uses a unit that does not exist
-
tx0/css:unspaced-calc-operatordefaultAn operator in a math function has no spaces around it
-
tx0/css:var-without-dashesdefaultVar() names a property that is not a custom property
Recommended: 33 rules
Likely bugs, resource and performance problems.
-
tx0/css:content-on-elementrecommendedContent with text is set on a rule that targets no pseudo-element
-
tx0/css:custom-property-without-varrecommendedA custom property is used as a value without var()
-
tx0/css:debug-directiverecommendedAn SCSS file prints with @debug
-
tx0/css:deep-combinatorrecommendedA selector uses a piercing combinator that browsers removed
-
tx0/css:duplicate-declarationrecommendedA block repeats a declaration with the same value
-
tx0/css:duplicate-font-namerecommendedA font family list names a font twice
-
tx0/css:duplicate-importrecommendedA stylesheet imports the same file twice
-
tx0/css:duplicate-keyframesrecommendedTwo keyframe animations have the same name
-
tx0/css:duplicate-selectorrecommendedA selector is written as a rule twice at the same level
-
tx0/css:duplicate-selector-in-listrecommendedA selector list repeats a selector
-
tx0/css:empty-blockrecommendedA rule has an empty block
-
tx0/css:float-with-absolute-positionrecommendedA float has no effect on an absolutely positioned element
-
tx0/css:focus-outline-removedrecommendedThe focus outline is removed with nothing to replace it
-
tx0/css:ignored-by-displayrecommendedA property has no effect with the display value of the same rule
-
tx0/css:insecure-url-in-cssrecommendedA stylesheet loads a resource over unencrypted HTTP
-
tx0/css:invalid-hex-colorrecommendedA hex color has the wrong number of digits or a letter that is not a digit
-
tx0/css:invalid-keyword-valuerecommendedA property is set to a keyword it does not accept
-
tx0/css:legacy-ie-filterrecommendedA declaration uses a filter or behavior of old Internet Explorer
-
tx0/css:legacy-ie-hackrecommendedA stylesheet uses a hack for old Internet Explorer
-
tx0/css:media-query-missing-spacerecommendedA media query writes a keyword directly before a parenthesis
-
tx0/css:prefixed-without-standardrecommendedA vendor-prefixed property has no standard property beside it
-
tx0/css:property-set-twicerecommendedA block sets a property twice, apart, to different values
-
tx0/css:sass-import-deprecatedrecommendedAn SCSS file loads another with the deprecated @import
-
tx0/css:shorthand-overrides-longhandrecommendedA shorthand property resets a longhand set before it
-
tx0/css:standard-before-prefixedrecommendedA standard property comes before its vendor-prefixed form
-
tx0/css:unknown-annotationrecommendedA declaration has a ! annotation that does not exist
-
tx0/css:unknown-at-rulerecommendedA stylesheet uses an at-rule that does not exist
-
tx0/css:unknown-color-namerecommendedA color property is set to a name that is not a color
-
tx0/css:unknown-functionrecommendedA value calls a function that does not exist
-
tx0/css:unknown-media-featurerecommendedA media query tests a feature that does not exist
-
tx0/css:unknown-propertyrecommendedA declaration uses a property that does not exist
-
tx0/css:unknown-pseudo-classrecommendedA selector uses a pseudo-class that does not exist
-
tx0/css:unknown-pseudo-elementrecommendedA selector uses a pseudo-element that does not exist
Strict: 27 rules
Code that can be written more plainly.
-
tx0/css:box-model-sizestrictA size is set together with padding or border without box-sizing
-
tx0/css:calc-single-valuestrictCalc() wraps a single value
-
tx0/css:deprecated-propertystrictA declaration uses a property that CSS replaced
-
tx0/css:empty-commentstrictA comment is empty
-
tx0/css:file-lengthstrictA stylesheet has more lines of code than the configured maximum
-
tx0/css:font-face-without-displaystrictAn @font-face does not set font-display
-
tx0/css:font-family-without-genericstrictA font family list has no generic family to fall back to
-
tx0/css:id-selectorstrictA selector uses an id
-
tx0/css:import-in-cssstrictA stylesheet loads another with @import
-
tx0/css:important-declarationstrictA declaration is marked important
-
tx0/css:important-overusestrictA stylesheet marks more declarations important than the configured maximum
-
tx0/css:large-z-indexstrictA z-index is larger than the configured maximum
-
tx0/css:long-hex-colorstrictA hex color is written long where a short form exists
-
tx0/css:longhands-to-shorthandstrictA block sets all four sides with longhand properties
-
tx0/css:nesting-depthstrictRules are nested deeper than the configured maximum
-
tx0/css:obsolete-vendor-prefixstrictA property has a prefix of a browser engine that is gone
-
tx0/css:qualified-class-selectorstrictA class selector is qualified with an element name
-
tx0/css:qualified-id-selectorstrictAn id selector is qualified with an element name
-
tx0/css:redundant-shorthand-valuesstrictA box shorthand repeats values it could leave out
-
tx0/css:selector-depthstrictA selector has more compound parts than the configured maximum
-
tx0/css:single-colon-pseudo-elementstrictA pseudo-element is written with a single colon
-
tx0/css:todo-commentstrictA comment marks unfinished work
-
tx0/css:transition-allstrictA transition animates every property
-
tx0/css:universal-key-selectorstrictA selector ends in the universal selector after a combinator
-
tx0/css:unneeded-vendor-prefixstrictA property has a vendor prefix that browsers no longer need
-
tx0/css:uppercase-hex-colorstrictA hex color is written in uppercase
-
tx0/css:zero-with-unitstrictA zero length has a unit