pub struct SelectorPart {
pub tag: String,
pub class: String,
pub hover: bool,
pub placeholder: bool,
pub attr_name: String,
pub attr_value: Option<String>,
pub combinator: Combinator,
}Expand description
A single part of a CSS selector (e.g., h1, .class, h1.class, [attr]).
Fields§
§tag: String§class: String§hover: bool§placeholder: boolThis part targets the ::placeholder pseudo-element of a form control,
i.e. the selector ended in ::placeholder.
Why a flag and not a general pseudo-element enum: ::placeholder is
the ONLY pseudo-element Velox has any notion of, because an <input>
has no child node for a general pseudo-element to style — the
placeholder is not a child, it is a string the painter draws when the
value is empty. A general enum would advertise support that does not
exist.
attr_name: String§attr_value: Option<String>§combinator: CombinatorCombinator that connected this part to the part on its left in the
source selector. Combinator::None for the leftmost part.
Trait Implementations§
Source§impl Clone for SelectorPart
impl Clone for SelectorPart
Source§impl Debug for SelectorPart
impl Debug for SelectorPart
Source§impl PartialEq for SelectorPart
impl PartialEq for SelectorPart
impl StructuralPartialEq for SelectorPart
Auto Trait Implementations§
impl Freeze for SelectorPart
impl RefUnwindSafe for SelectorPart
impl Send for SelectorPart
impl Sync for SelectorPart
impl Unpin for SelectorPart
impl UnsafeUnpin for SelectorPart
impl UnwindSafe for SelectorPart
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more