Hide Comments
Hide Comments

TSVGElement.Matches(String) Method

Comments (0)

Returns the specificity (>=0) of the match with the selector string or -1 if there is no match.

A selector's specificity is calculated as follows:

Count the number of ID selectors in the selector (= a)

Count the number of class selectors, attributes selectors, and pseudo-classes in the selector (= b)

Count the number of type selectors and pseudo-elements in the selector (= c)

Ignore the universal selector

Selectors inside the negation pseudo-class are counted like any other, but the negation itself does not count as a pseudo-class.

Concatenating the three numbers a-b-c (in a number system with a large base) gives the specificity.

Namespace: RSSVG

expandingSyntax

Parameters

Selector

Type: String

Return Value

Type: Integer

expandingSee Also

Comments (0)

RiverSoftAVG SVG Component Library (RSCL) © 2013-2016, Thomas G. Grubb