pipes.Rd
Convenient pipes for more sophisticated selectors.
lhs %child% rhs lhs %or% rhs lhs %with% rhs
lhs, rhs | Selectors as returned by |
---|
%child%
- Selects elements where right hand is child of left hand, e.g.: sel_tag('div') %child% sel_class('aClass')
selects elements with aClass
who are direct children of div
tags.
%or%
- Select left hand or right hand, e.g.: sel_id('myId') %or% sel_class('myClass')
will select both the element with the id and elements with the class. Ideal to select and apply rules multiple elements at once.
%with%
- Left hand selector with right hand selector, e.g.: sel_tag('div') %with% sel_class('aClass')
selects a div
with a class of aClass
. Ideal to narrow down the selection.
#>#> ℹ CSS selector: .redp# select multiple elements # where id = "x" or class = "center" sel_id("x") %or% sel_class("center")#> ℹ CSS selector: #x,.center#> ℹ CSS selector: #y #y