public class SelectorHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
getSpecificity(int a,
int b,
int c,
int d)
Computes the specificity of a selector.
|
public static int getSpecificity(int a,
int b,
int c,
int d)
a - 1 if the declaration is from is a 'style' attribute rather than a rule with a selector, 0 otherwise.b - the number of ID attributes in the selector.c - the number of other attributes and pseudo-classes in the selector.d - the number of widget names and pseudo-widgets in the selector.