diff --git a/properties/common_types.rs b/properties/common_types.rs index b567647386d..8031df10479 100644 --- a/properties/common_types.rs +++ b/properties/common_types.rs @@ -122,6 +122,8 @@ pub mod specified { pub mod computed { use cssparser; + pub use CSSColor = cssparser::Color; + pub use compute_CSSColor = std::util::id; use super::*; use super::super::longhands::font_weight; pub struct Context { @@ -177,16 +179,4 @@ pub mod computed { specified::LPA_Auto => LPA_Auto, } } - - pub struct CSSColor { - rgba: cssparser::RGBA, - is_current_color: bool, // For inheritance - } - pub fn compute_CSSColor(color: specified::CSSColor, context: &Context) -> CSSColor { - match color { - cssparser::RGBA(rgba) => CSSColor { rgba: rgba, is_current_color: false }, - cssparser::CurrentColor => CSSColor { rgba: context.current_color, - is_current_color: true }, - } - } }