Skip to content

Commit

Permalink
style: Add SVG geometry property support in CSS.
Browse files Browse the repository at this point in the history
This patch adds SVG geometry properties to CSS, it doesn't deal with
how SVG handles them.

Differential Revision: https://phabricator.services.mozilla.com/D29937
  • Loading branch information
violette77 authored and emilio committed May 29, 2019
1 parent d552969 commit bd14810
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions components/style/properties/longhands/svg.mako.rs
Expand Up @@ -191,3 +191,66 @@ ${helpers.predefined_type(
animation_value_type="discrete",
flags="CREATES_STACKING_CONTEXT",
)}

${helpers.predefined_type(
"x",
"LengthPercentage",
"computed::LengthPercentage::zero()",
products="gecko",
animation_value_type="ComputedValue",
spec="https://svgwg.org/svg2-draft/geometry.html#X",
)}

${helpers.predefined_type(
"y",
"LengthPercentage",
"computed::LengthPercentage::zero()",
products="gecko",
animation_value_type="ComputedValue",
spec="https://svgwg.org/svg2-draft/geometry.html#Y",
)}

${helpers.predefined_type(
"cx",
"LengthPercentage",
"computed::LengthPercentage::zero()",
products="gecko",
animation_value_type="ComputedValue",
spec="https://svgwg.org/svg2-draft/geometry.html#CX",
)}

${helpers.predefined_type(
"cy",
"LengthPercentage",
"computed::LengthPercentage::zero()",
products="gecko",
animation_value_type="ComputedValue",
spec="https://svgwg.org/svg2-draft/geometry.html#CY",
)}

${helpers.predefined_type(
"rx",
"NonNegativeLengthPercentageOrAuto",
"computed::NonNegativeLengthPercentageOrAuto::auto()",
products="gecko",
animation_value_type="LengthPercentageOrAuto",
spec="https://svgwg.org/svg2-draft/geometry.html#RX",
)}

${helpers.predefined_type(
"ry",
"NonNegativeLengthPercentageOrAuto",
"computed::NonNegativeLengthPercentageOrAuto::auto()",
products="gecko",
animation_value_type="LengthPercentageOrAuto",
spec="https://svgwg.org/svg2-draft/geometry.html#RY",
)}

${helpers.predefined_type(
"r",
"NonNegativeLengthPercentage",
"computed::NonNegativeLengthPercentage::zero()",
products="gecko",
animation_value_type="LengthPercentage",
spec="https://svgwg.org/svg2-draft/geometry.html#R",
)}

0 comments on commit bd14810

Please sign in to comment.