DiviArea.Utils.getCssSpecificity()

  1. Home
  2. Knowledge Base
  3. Codex
  4. JS API
  5. JS Functions
  6. DiviArea.Utils.getCssSpecificity()
DiviArea.Utils.getCssSpecificity(selector, attribValue)

Calculates the CSS Specificity of a given selector.

Params

selector
(string, required) The CSS selector, like body .et_ob_section
prop
(string, required) The attribute value to compare. The function checks, if the value contains an !important marker.

Returns

An specificity array, consisting of 4 numeric values.

Notes

No notes

Was this article helpful?

Related Articles