pub enum QueryStyleRange {
StyleRange2 {
value1: QueryExpressionValue,
op1: Operator,
value2: QueryExpressionValue,
},
StyleRange3 {
value1: QueryExpressionValue,
op1: Operator,
value2: QueryExpressionValue,
op2: Operator,
value3: QueryExpressionValue,
},
}Expand description
https://drafts.csswg.org/css-conditional-5/#typedef-style-range
Variants§
StyleRange2
A style-range for style container queries with two values (val1 OP val2).
StyleRange3
A style-range for style container queries with three values (val1 OP val2 OP val3).
Implementations§
Source§impl QueryStyleRange
impl QueryStyleRange
Sourcepub fn parse<'i, 't>(
context: &ParserContext<'_>,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>>
pub fn parse<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>
Parses the following range syntax:
value
This is only used when parsing @container style() queries; the feature_type and index is hardcoded (and ignored).
Sourcepub fn evaluate(&self, context: &Context<'_>) -> KleeneValue
pub fn evaluate(&self, context: &Context<'_>) -> KleeneValue
Returns whether this style-range query evaluates to true for the given context.
fn resolve_value( value: &QueryExpressionValue, context: &Context<'_>, visited_set: &mut PrecomputedHashSet<DashedIdent>, ) -> Option<Component>
fn resolve_universal( css_text: &str, url_data: &UrlExtraData, context: &Context<'_>, visited_set: &mut PrecomputedHashSet<DashedIdent>, ) -> Option<Component>
fn compare_values( value1: Option<&Component>, value2: Option<&Component>, ) -> Option<Ordering>
Trait Implementations§
Source§impl Clone for QueryStyleRange
impl Clone for QueryStyleRange
Source§fn clone(&self) -> QueryStyleRange
fn clone(&self) -> QueryStyleRange
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QueryStyleRange
impl Debug for QueryStyleRange
Source§impl MallocSizeOf for QueryStyleRange
impl MallocSizeOf for QueryStyleRange
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl PartialEq for QueryStyleRange
impl PartialEq for QueryStyleRange
Source§impl ToCss for QueryStyleRange
impl ToCss for QueryStyleRange
Source§fn to_css<W>(&self, dest: &mut CssWriter<'_, W>) -> Resultwhere
W: Write,
fn to_css<W>(&self, dest: &mut CssWriter<'_, W>) -> Resultwhere
W: Write,
Serialize
self in CSS syntax, writing to dest.Source§fn to_css_string(&self) -> String
fn to_css_string(&self) -> String
Serialize
self in CSS syntax and return a string. Read moreSource§fn to_css_cssstring(&self) -> String
fn to_css_cssstring(&self) -> String
Serialize
self in CSS syntax and return a CssString. Read moreSource§impl ToShmem for QueryStyleRange
impl ToShmem for QueryStyleRange
impl StructuralPartialEq for QueryStyleRange
Auto Trait Implementations§
impl Freeze for QueryStyleRange
impl RefUnwindSafe for QueryStyleRange
impl Send for QueryStyleRange
impl Sync for QueryStyleRange
impl Unpin for QueryStyleRange
impl UnwindSafe for QueryStyleRange
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert