/respec

respec allows CSS authors to assign the specificity of a rule separately from the specificity of the selector

Primary LanguageHTMLMIT LicenseMIT

respec

Respec allows CSS authors to assign a specificity level to the rules they write separate from the specificity of the selector

Inspired by w3c/csswg-drafts#1170

Syntax

respec(selector, specificity, rule)
  • selector is a CSS selector
  • specificity is a number 0 or greater
  • rule is one or more CSS declarations separated by semicolons

Example

respec('div', 3, 'background: lime;')

Website