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:
1. | Count the number of ID selectors in the selector (= a) |
2. | Count the number of class selectors, attributes selectors, and pseudo-classes in the selector (= b) |
3. | Count the number of type selectors and pseudo-elements in the selector (= c) |
4. | Ignore the universal selector |
5. | Selectors inside the negation pseudo-class are counted like any other, but the negation itself does not count as a pseudo-class. |
Namespace: FMX.RS.SVG
Delphi |
public |
Parameters
Selector
Type: String
Type: Integer