Skip to content

Commit

Permalink
Remove the 'ch' font-relative length unit
Browse files Browse the repository at this point in the history
  • Loading branch information
luniv committed Mar 5, 2015
1 parent dc5a9e5 commit a8cd40e
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions components/style/values.rs
Expand Up @@ -120,7 +120,6 @@ pub mod specified {
pub enum FontRelativeLength {
Em(CSSFloat),
Ex(CSSFloat),
Ch(CSSFloat),
Rem(CSSFloat)
}

Expand All @@ -133,7 +132,6 @@ pub mod specified {
match self {
&FontRelativeLength::Em(length) => write!(dest, "{}em", length),
&FontRelativeLength::Ex(length) => write!(dest, "{}ex", length),
&FontRelativeLength::Ch(length) => write!(dest, "{}ch", length),
&FontRelativeLength::Rem(length) => write!(dest, "{}rem", length)
}
}
Expand All @@ -151,7 +149,6 @@ pub mod specified {
let x_height = 0.5; // TODO: find that from the font
reference_font_size.scale_by(length * x_height)
},
&FontRelativeLength::Ch(_) => unimplemented!(),
&FontRelativeLength::Rem(length) => root_font_size.scale_by(length)
}
}
Expand Down Expand Up @@ -281,7 +278,6 @@ pub mod specified {
// font-relative
"em" => Ok(Length::FontRelative(FontRelativeLength::Em(value))),
"ex" => Ok(Length::FontRelative(FontRelativeLength::Ex(value))),
"ch" => Err(()),
"rem" => Ok(Length::FontRelative(FontRelativeLength::Rem(value))),
// viewport percentages
"vw" => Ok(Length::ViewportPercentage(ViewportPercentageLength::Vw(value))),
Expand Down

0 comments on commit a8cd40e

Please sign in to comment.