diff options
Diffstat (limited to 'components/style/values/generics/grid.rs')
-rw-r--r-- | components/style/values/generics/grid.rs | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/components/style/values/generics/grid.rs b/components/style/values/generics/grid.rs index 73640a91e49..3775bb30597 100644 --- a/components/style/values/generics/grid.rs +++ b/components/style/values/generics/grid.rs @@ -329,8 +329,8 @@ pub fn concat_serialize_idents<W>(prefix: &str, suffix: &str, /// The initial argument of the `repeat` function. /// /// https://drafts.csswg.org/css-grid/#typedef-track-repeat -#[derive(Clone, Copy, PartialEq, Debug)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] +#[derive(Clone, Copy, Debug, PartialEq, ToCss)] pub enum RepeatCount { /// A positive integer. This is allowed only for `<track-repeat>` and `<fixed-repeat>` Number(Integer), @@ -340,16 +340,6 @@ pub enum RepeatCount { AutoFit, } -impl ToCss for RepeatCount { - fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { - match *self { - RepeatCount::Number(ref c) => c.to_css(dest), - RepeatCount::AutoFill => dest.write_str("auto-fill"), - RepeatCount::AutoFit => dest.write_str("auto-fit"), - } - } -} - impl Parse for RepeatCount { fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> { if let Ok(i) = input.try(|i| Integer::parse(context, i)) { |