Add spec links for padding properties

This commit is contained in:
Manish Goregaokar 2017-01-02 19:25:22 -08:00
parent e7464b5fd5
commit 6cf15de868
2 changed files with 9 additions and 2 deletions

View file

@ -7,10 +7,16 @@
<% data.new_style_struct("Padding", inherited=False) %>
% for side in ALL_SIDES:
<%
spec = "https://drafts.csswg.org/css-box/#propdef-padding-%s" % side[0]
if side[1]:
spec = "https://drafts.csswg.org/css-logical-props/#propdef-padding-%s" % side[1]
%>
${helpers.predefined_type("padding-%s" % side[0], "LengthOrPercentage",
"computed::LengthOrPercentage::Length(Au(0))",
"parse_non_negative",
needs_context=False,
animatable=True,
logical = side[1])}
logical = side[1],
spec = spec)}
% endfor

View file

@ -4,4 +4,5 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
${helpers.four_sides_shorthand("padding", "padding-%s", "specified::LengthOrPercentage::parse")}
${helpers.four_sides_shorthand("padding", "padding-%s", "specified::LengthOrPercentage::parse",
spec="https://drafts.csswg.org/css-box-3/#propdef-padding")}