Add spec links for margin properties, support spec links on four_sides_shorthand

This commit is contained in:
Manish Goregaokar 2017-01-02 19:19:31 -08:00
parent 6138b6aa75
commit 3128694bff
3 changed files with 12 additions and 7 deletions

View file

@ -551,10 +551,9 @@
% endif
</%def>
<%def name="four_sides_shorthand(name, sub_property_pattern, parser_function, needs_context=True)">
<%self:shorthand name="${name}" sub_properties="${
' '.join(sub_property_pattern % side
for side in ['top', 'right', 'bottom', 'left'])}">
<%def name="four_sides_shorthand(name, sub_property_pattern, parser_function, needs_context=True, **kwargs)">
<% sub_properties=' '.join(sub_property_pattern % side for side in ['top', 'right', 'bottom', 'left']) %>
<%call expr="self.shorthand(name, sub_properties=sub_properties, **kwargs)">
#[allow(unused_imports)]
use parser::Parse;
use super::parse_four_sides;
@ -586,7 +585,7 @@
)
}
}
</%self:shorthand>
</%call>
</%def>
<%def name="logical_setter_helper(name)">