Struct style::media_queries::MediaList
[−]
[src]
pub struct MediaList {
pub media_queries: Vec<MediaQuery>,
}A type that encapsulates a media query list.
Fields
media_queries: Vec<MediaQuery>
The list of media queries.
Methods
impl MediaList[src]
impl MediaList[src]
pub fn evaluate(&self, device: &Device, quirks_mode: QuirksMode) -> bool[src]
Evaluate a whole MediaList against Device.
pub fn is_empty(&self) -> bool[src]
Whether this MediaList contains no media queries.
pub fn append_medium(
&mut self,
context: &ParserContext,
new_medium: &str
) -> bool[src]
&mut self,
context: &ParserContext,
new_medium: &str
) -> bool
Append a new media query item to the media list. https://drafts.csswg.org/cssom/#dom-medialist-appendmedium
Returns true if added, false if fail to parse the medium string.
pub fn delete_medium(
&mut self,
context: &ParserContext,
old_medium: &str
) -> bool[src]
&mut self,
context: &ParserContext,
old_medium: &str
) -> bool
Delete a media query from the media list. https://drafts.csswg.org/cssom/#dom-medialist-deletemedium
Returns true if found and deleted, false otherwise.
Trait Implementations
impl Clone for MediaList[src]
fn clone(&self) -> MediaList[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Debug for MediaList[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl MallocSizeOf for MediaList[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize[src]
Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more