mirror of
https://github.com/servo/servo.git
synced 2025-06-23 16:44:33 +01:00
Move ToCss impl for Shadow types to values mod.
This commit is contained in:
parent
f388c0ab1e
commit
2bd1ff0450
3 changed files with 39 additions and 42 deletions
|
@ -483,6 +483,24 @@ pub struct Shadow {
|
|||
pub inset: bool,
|
||||
}
|
||||
|
||||
impl ToCss for Shadow {
|
||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
if self.inset {
|
||||
dest.write_str("inset ")?;
|
||||
}
|
||||
self.blur_radius.to_css(dest)?;
|
||||
dest.write_str(" ")?;
|
||||
self.spread_radius.to_css(dest)?;
|
||||
dest.write_str(" ")?;
|
||||
self.offset_x.to_css(dest)?;
|
||||
dest.write_str(" ")?;
|
||||
self.offset_y.to_css(dest)?;
|
||||
dest.write_str(" ")?;
|
||||
self.color.to_css(dest)?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
/// A `<number>` value.
|
||||
pub type Number = CSSFloat;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue