Function selectors::matching::matches_simple_selector
[−]
[src]
pub fn matches_simple_selector<E>(selector: &SimpleSelector<E::Impl>, element: &E, shareable: &mut bool) -> bool where E: Element
Determines whether the given element matches the given single selector.
NB: If you add support for any new kinds of selectors to this routine, be sure to set
shareable
to false unless you are willing to update the style sharing logic. Otherwise things
will almost certainly break as elements will start mistakenly sharing styles. (See the code in
main/css/matching.rs
.)