mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #10959 - heycam:color, r=bholley
Support color-typed properties in geckolib This is on top of https://github.com/servo/servo/pull/10957 though I'm not sure how to make that PR's commits not appear in this one. r? @bholley <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10959) <!-- Reviewable:end -->
This commit is contained in:
commit
1a1ea30f8c
5 changed files with 162 additions and 4 deletions
|
@ -20,6 +20,7 @@
|
|||
<%call expr="longhand(name, predefined_type=type, **kwargs)">
|
||||
#[allow(unused_imports)]
|
||||
use app_units::Au;
|
||||
use cssparser::{Color as CSSParserColor, RGBA};
|
||||
pub type SpecifiedValue = specified::${type};
|
||||
pub mod computed_value {
|
||||
pub use values::computed::${type} as T;
|
||||
|
|
|
@ -15,12 +15,27 @@ ${helpers.single_keyword("vector-effect", "none non-scaling-stroke", products="g
|
|||
|
||||
// Section 13 - Gradients and Patterns
|
||||
|
||||
${helpers.predefined_type(
|
||||
"stop-color", "CSSColor",
|
||||
"CSSParserColor::RGBA(RGBA { red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0 })",
|
||||
products="gecko")}
|
||||
|
||||
${helpers.predefined_type("stop-opacity", "Opacity", "1.0", products="gecko")}
|
||||
|
||||
// Section 15 - Filter Effects
|
||||
|
||||
${helpers.predefined_type(
|
||||
"flood-color", "CSSColor",
|
||||
"CSSParserColor::RGBA(RGBA { red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0 })",
|
||||
products="gecko")}
|
||||
|
||||
${helpers.predefined_type("flood-opacity", "Opacity", "1.0", products="gecko")}
|
||||
|
||||
${helpers.predefined_type(
|
||||
"lighting-color", "CSSColor",
|
||||
"CSSParserColor::RGBA(RGBA { red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0 })",
|
||||
products="gecko")}
|
||||
|
||||
// CSS Masking Module Level 1
|
||||
// https://www.w3.org/TR/css-masking-1/
|
||||
${helpers.single_keyword("mask-type", "luminance alpha", products="gecko")}
|
||||
|
|
|
@ -107,3 +107,8 @@ ${helpers.single_keyword("unicode-bidi", "normal embed isolate bidi-override iso
|
|||
${helpers.single_keyword("text-decoration-style",
|
||||
"-moz-none solid double dotted dashed wavy",
|
||||
products="gecko")}
|
||||
|
||||
${helpers.predefined_type(
|
||||
"text-decoration-color", "CSSColor",
|
||||
"CSSParserColor::RGBA(RGBA { red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0 })",
|
||||
products="gecko")}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue