mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: remove shorthand/serialize.mako.rs.
Bug: 1468651 Reviewed-by: heycam MozReview-Commit-ID: 8Xyep2Q7trR
This commit is contained in:
parent
3b90ddd5d1
commit
5c15c59f56
2 changed files with 26 additions and 28 deletions
|
@ -137,7 +137,32 @@ pub mod shorthands {
|
|||
use style_traits::{ParseError, StyleParseErrorKind};
|
||||
use values::specified;
|
||||
|
||||
<%include file="/shorthand/serialize.mako.rs" />
|
||||
use style_traits::{CssWriter, ToCss};
|
||||
use values::specified::{BorderStyle, Color};
|
||||
use std::fmt::{self, Write};
|
||||
|
||||
fn serialize_directional_border<W, I,>(
|
||||
dest: &mut CssWriter<W>,
|
||||
width: &I,
|
||||
style: &BorderStyle,
|
||||
color: &Color,
|
||||
) -> fmt::Result
|
||||
where
|
||||
W: Write,
|
||||
I: ToCss,
|
||||
{
|
||||
width.to_css(dest)?;
|
||||
// FIXME(emilio): Should we really serialize the border style if it's
|
||||
// `solid`?
|
||||
dest.write_str(" ")?;
|
||||
style.to_css(dest)?;
|
||||
if *color != Color::CurrentColor {
|
||||
dest.write_str(" ")?;
|
||||
color.to_css(dest)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
<%include file="/shorthand/background.mako.rs" />
|
||||
<%include file="/shorthand/border.mako.rs" />
|
||||
<%include file="/shorthand/box.mako.rs" />
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use style_traits::{CssWriter, ToCss};
|
||||
use values::specified::{BorderStyle, Color};
|
||||
use std::fmt::{self, Write};
|
||||
|
||||
fn serialize_directional_border<W, I,>(
|
||||
dest: &mut CssWriter<W>,
|
||||
width: &I,
|
||||
style: &BorderStyle,
|
||||
color: &Color,
|
||||
) -> fmt::Result
|
||||
where
|
||||
W: Write,
|
||||
I: ToCss,
|
||||
{
|
||||
width.to_css(dest)?;
|
||||
dest.write_str(" ")?;
|
||||
style.to_css(dest)?;
|
||||
if *color != Color::CurrentColor {
|
||||
dest.write_str(" ")?;
|
||||
color.to_css(dest)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue