mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
style: Expose colors via cbindgen.
Also s/Foreground/CurrentColor. Differential Revision: https://phabricator.services.mozilla.com/D25975
This commit is contained in:
parent
a6f32bc762
commit
691eb36ffe
6 changed files with 50 additions and 37 deletions
|
@ -33,8 +33,8 @@ impl Color {
|
|||
// Common cases that the complex color is either pure numeric
|
||||
// color or pure currentcolor.
|
||||
GenericColor::Numeric(color) => return color,
|
||||
GenericColor::Foreground => return fg_color,
|
||||
GenericColor::Complex(color, ratios) => (color, ratios),
|
||||
GenericColor::CurrentColor => return fg_color,
|
||||
GenericColor::Complex { color, ratios } => (color, ratios),
|
||||
};
|
||||
|
||||
// For the more complicated case that the alpha value differs,
|
||||
|
@ -76,7 +76,7 @@ impl ToCss for Color {
|
|||
{
|
||||
match *self {
|
||||
GenericColor::Numeric(color) => color.to_css(dest),
|
||||
GenericColor::Foreground => CSSParserColor::CurrentColor.to_css(dest),
|
||||
GenericColor::CurrentColor => CSSParserColor::CurrentColor.to_css(dest),
|
||||
_ => Ok(()),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue