tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

margin.mako.rs (1916B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
      4 
      5 <%namespace name="helpers" file="/helpers.mako.rs" />
      6 <% from data import ALL_SIDES, DEFAULT_RULES, DEFAULT_RULES_AND_PAGE, POSITION_TRY_RULE, maybe_moz_logical_alias %>
      7 
      8 % for index, side in enumerate(ALL_SIDES):
      9    <%
     10        spec = "https://drafts.csswg.org/css-box/#propdef-margin-%s" % side[0]
     11        if side[1]:
     12            spec = "https://drafts.csswg.org/css-logical-props/#propdef-margin-%s" % side[1]
     13    %>
     14    ${helpers.predefined_type(
     15        "margin-%s" % side[0],
     16        "Margin",
     17        "computed::Margin::zero()",
     18        engines="gecko servo",
     19        aliases=maybe_moz_logical_alias(engine, side, "-moz-margin-%s"),
     20        allow_quirks="No" if side[1] else "Yes",
     21        logical=side[1],
     22        logical_group="margin",
     23        gecko_ffi_name="mMargin.{}".format(index),
     24        spec=spec,
     25        rule_types_allowed=(DEFAULT_RULES if side[1] else DEFAULT_RULES_AND_PAGE) | POSITION_TRY_RULE,
     26        servo_restyle_damage="rebuild_box",
     27        affects="layout",
     28    )}
     29 % endfor
     30 
     31 ${helpers.predefined_type(
     32    "overflow-clip-margin",
     33    "OverflowClipMargin",
     34    "computed::OverflowClipMargin::zero()",
     35    engines="gecko servo",
     36    spec="https://drafts.csswg.org/css-overflow/#propdef-overflow-clip-margin",
     37    affects="overflow",
     38 )}
     39 
     40 % for index, side in enumerate(ALL_SIDES):
     41    ${helpers.predefined_type(
     42        "scroll-margin-%s" % side[0],
     43        "Length",
     44        "computed::Length::zero()",
     45        engines="gecko",
     46        logical=side[1],
     47        logical_group="scroll-margin",
     48        gecko_ffi_name="mScrollMargin.{}".format(index),
     49        spec="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin-%s" % side[0],
     50        affects="",
     51    )}
     52 % endfor