Don't serialize currentcolor for border shorthand

This commit is contained in:
Xidorn Quan 2017-02-28 17:17:54 +11:00
parent f33b0b4ea3
commit e850d9572a

View file

@ -2,6 +2,7 @@
* 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 cssparser::Color;
use properties::DeclaredValue;
use style_traits::ToCss;
use values::specified::{BorderStyle, CSSColor};
@ -84,7 +85,7 @@ fn serialize_directional_border<W, I,>(dest: &mut W,
};
match *color {
DeclaredValue::Value(ref color) => {
DeclaredValue::Value(ref color) if color.parsed != Color::CurrentColor => {
try!(write!(dest, " "));
color.to_css(dest)
},