From 6cf15de8681a4b00f680773e6c587c68341b19d2 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Mon, 2 Jan 2017 19:25:22 -0800 Subject: [PATCH] Add spec links for padding properties --- components/style/properties/longhand/padding.mako.rs | 8 +++++++- components/style/properties/shorthand/padding.mako.rs | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/components/style/properties/longhand/padding.mako.rs b/components/style/properties/longhand/padding.mako.rs index b0778bde34b..1f029f53192 100644 --- a/components/style/properties/longhand/padding.mako.rs +++ b/components/style/properties/longhand/padding.mako.rs @@ -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 diff --git a/components/style/properties/shorthand/padding.mako.rs b/components/style/properties/shorthand/padding.mako.rs index 09363b950eb..a0e94f8bdcb 100644 --- a/components/style/properties/shorthand/padding.mako.rs +++ b/components/style/properties/shorthand/padding.mako.rs @@ -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")}