Skip to content

Commit

Permalink
Derive ToCss for media query qualifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
nox committed Jun 17, 2017
1 parent 3217d14 commit b0bc1d0
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions components/style/media_queries.rs
Expand Up @@ -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
Expand All @@ -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/
Expand Down

0 comments on commit b0bc1d0

Please sign in to comment.