Back to API Reference
Interface

IMarkupSelector

abstract

Chooses which visible markup tags a ChromeRule styles. Selectors are tested against each matched markup occurrence (its rule and modifier); chrome rules of different modifier kinds all apply, and among same-kind rules the highest Specificity wins, ties resolving to the first listed. Implement to target markup by a dimension other than the built-in modifier/rule/any.

Implementations(3)

Types that implement IMarkupSelector.

public int Specificity{ get }

Tie-break weight when several selectors match the same markup. Higher wins. Use a larger value for a narrower selector so the specific rule beats the general one.

public abstract bool Matches()

Whether this selector targets the markup parsed by rule into modifier.

public Action Changed

Raised after configuration changes that can affect matching or specificity. Mutable custom implementations must raise this for every such change so an owning chrome rule can reconcile.