mirror of
https://github.com/servo/servo.git
synced 2025-07-26 00:30:22 +01:00
Remove the 'ch' font-relative length unit
This commit is contained in:
parent
dc5a9e56c7
commit
a8cd40e270
1 changed files with 0 additions and 4 deletions
|
@ -120,7 +120,6 @@ pub mod specified {
|
||||||
pub enum FontRelativeLength {
|
pub enum FontRelativeLength {
|
||||||
Em(CSSFloat),
|
Em(CSSFloat),
|
||||||
Ex(CSSFloat),
|
Ex(CSSFloat),
|
||||||
Ch(CSSFloat),
|
|
||||||
Rem(CSSFloat)
|
Rem(CSSFloat)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,7 +132,6 @@ pub mod specified {
|
||||||
match self {
|
match self {
|
||||||
&FontRelativeLength::Em(length) => write!(dest, "{}em", length),
|
&FontRelativeLength::Em(length) => write!(dest, "{}em", length),
|
||||||
&FontRelativeLength::Ex(length) => write!(dest, "{}ex", length),
|
&FontRelativeLength::Ex(length) => write!(dest, "{}ex", length),
|
||||||
&FontRelativeLength::Ch(length) => write!(dest, "{}ch", length),
|
|
||||||
&FontRelativeLength::Rem(length) => write!(dest, "{}rem", length)
|
&FontRelativeLength::Rem(length) => write!(dest, "{}rem", length)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -151,7 +149,6 @@ pub mod specified {
|
||||||
let x_height = 0.5; // TODO: find that from the font
|
let x_height = 0.5; // TODO: find that from the font
|
||||||
reference_font_size.scale_by(length * x_height)
|
reference_font_size.scale_by(length * x_height)
|
||||||
},
|
},
|
||||||
&FontRelativeLength::Ch(_) => unimplemented!(),
|
|
||||||
&FontRelativeLength::Rem(length) => root_font_size.scale_by(length)
|
&FontRelativeLength::Rem(length) => root_font_size.scale_by(length)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -281,7 +278,6 @@ pub mod specified {
|
||||||
// font-relative
|
// font-relative
|
||||||
"em" => Ok(Length::FontRelative(FontRelativeLength::Em(value))),
|
"em" => Ok(Length::FontRelative(FontRelativeLength::Em(value))),
|
||||||
"ex" => Ok(Length::FontRelative(FontRelativeLength::Ex(value))),
|
"ex" => Ok(Length::FontRelative(FontRelativeLength::Ex(value))),
|
||||||
"ch" => Err(()),
|
|
||||||
"rem" => Ok(Length::FontRelative(FontRelativeLength::Rem(value))),
|
"rem" => Ok(Length::FontRelative(FontRelativeLength::Rem(value))),
|
||||||
// viewport percentages
|
// viewport percentages
|
||||||
"vw" => Ok(Length::ViewportPercentage(ViewportPercentageLength::Vw(value))),
|
"vw" => Ok(Length::ViewportPercentage(ViewportPercentageLength::Vw(value))),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue