Function style::stylesheets::page_rule::selector_specificity

source ยท
fn selector_specificity(g: usize, h: usize, f: bool) -> u32
Expand description

Computes the specificity given the g, h, and f values as in the spec.

g is number of :first or :blank, h is number of :left or :right, f is if the selector includes a page-name (selectors can only include one or zero page-names).

This places hard limits of 65535 on h and 32767 on g, at which point all higher values are treated as those limits respectively.