Show/Hide Toolbars

RiverSoftAVG Products Help

Navigation: Code Documentation > RSVclSVG > RSSVG > Classes > TSVGGraphicElement > Methods

TSVGGraphicElement.Matches(String) Method

Scroll Prev Top Next More

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

Parameters

Selector

Type: String

Return Value

Type: Integer

Overrides

TSVGElement.Matches(String)
 

RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb