mirror of
https://github.com/servo/servo.git
synced 2025-08-14 09:55:35 +01:00
Improve properties.mako.rs file structure, take 2
This is a new attempt of #10586, after Simon Sapin's great cleanups in #10749 has landed. I have adjusted the changes to the new structure that was introduced, and also only done a few of the longhand ones. Will certainly continue on this as soon as we have a basic agreement that this style is reasonable.
This commit is contained in:
parent
a6fc440125
commit
d0489f1160
10 changed files with 358 additions and 305 deletions
12
components/style/properties/longhand/margin.mako.rs
Normal file
12
components/style/properties/longhand/margin.mako.rs
Normal file
|
@ -0,0 +1,12 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
<%page args="data, helpers" />
|
||||
|
||||
<% data.new_style_struct("Margin", inherited=False, gecko_ffi_name="nsStyleMargin") %>
|
||||
|
||||
% for side in ["top", "right", "bottom", "left"]:
|
||||
${helpers.predefined_type("margin-" + side, "LengthOrPercentageOrAuto",
|
||||
"computed::LengthOrPercentageOrAuto::Length(Au(0))")}
|
||||
% endfor
|
Loading…
Add table
Add a link
Reference in a new issue