mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
stylo: Add support for <table> color quirk
MozReview-Commit-ID: 56IKARwfbhw
This commit is contained in:
parent
0392e58a2f
commit
1c23296d8a
6 changed files with 62 additions and 25 deletions
|
@ -107,24 +107,27 @@ impl ToCss for CSSColor {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<Color> for CSSColor {
|
||||
fn from(color: Color) -> Self {
|
||||
CSSColor {
|
||||
parsed: color,
|
||||
authored: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl CSSColor {
|
||||
#[inline]
|
||||
/// Returns currentcolor value.
|
||||
pub fn currentcolor() -> CSSColor {
|
||||
CSSColor {
|
||||
parsed: Color::CurrentColor,
|
||||
authored: None,
|
||||
}
|
||||
Color::CurrentColor.into()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
/// Returns transparent value.
|
||||
pub fn transparent() -> CSSColor {
|
||||
CSSColor {
|
||||
parsed: Color::RGBA(cssparser::RGBA::transparent()),
|
||||
// This should probably be "transparent", but maybe it doesn't matter.
|
||||
authored: None,
|
||||
}
|
||||
// We should probably set authored to "transparent", but maybe it doesn't matter.
|
||||
Color::RGBA(cssparser::RGBA::transparent()).into()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue