mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Allow shorthands to be restricted to specific products.
This commit is contained in:
parent
a12493f5fe
commit
2b8f809852
2 changed files with 10 additions and 3 deletions
|
@ -191,10 +191,12 @@
|
|||
</%call>
|
||||
</%def>
|
||||
|
||||
<%def name="shorthand(name, sub_properties, experimental=False)">
|
||||
<%def name="shorthand(name, sub_properties, experimental=False, **kwargs)">
|
||||
<%
|
||||
shorthand = data.declare_shorthand(name, sub_properties.split(), experimental=experimental)
|
||||
shorthand = data.declare_shorthand(name, sub_properties.split(), experimental=experimental,
|
||||
**kwargs)
|
||||
%>
|
||||
% if shorthand:
|
||||
pub mod ${shorthand.ident} {
|
||||
use cssparser::Parser;
|
||||
use parser::ParserContext;
|
||||
|
@ -252,6 +254,7 @@
|
|||
${caller.body()}
|
||||
}
|
||||
}
|
||||
% endif
|
||||
</%def>
|
||||
|
||||
<%def name="four_sides_shorthand(name, sub_property_pattern, parser_function)">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue