mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Derive ToCss for media query qualifiers
This commit is contained in:
parent
3217d1404e
commit
b0bc1d05a9
1 changed files with 1 additions and 12 deletions
|
@ -45,8 +45,8 @@ impl MediaList {
|
|||
}
|
||||
|
||||
/// https://drafts.csswg.org/mediaqueries/#mq-prefix
|
||||
#[derive(PartialEq, Eq, Copy, Clone, Debug)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, ToCss)]
|
||||
pub enum Qualifier {
|
||||
/// Hide a media query from legacy UAs:
|
||||
/// https://drafts.csswg.org/mediaqueries/#mq-only
|
||||
|
@ -56,17 +56,6 @@ pub enum Qualifier {
|
|||
Not,
|
||||
}
|
||||
|
||||
impl ToCss for Qualifier {
|
||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result
|
||||
where W: fmt::Write
|
||||
{
|
||||
dest.write_str(match *self {
|
||||
Qualifier::Not => "not",
|
||||
Qualifier::Only => "only",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/// A [media query][mq].
|
||||
///
|
||||
/// [mq]: https://drafts.csswg.org/mediaqueries/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue