Source code
Revision control
Copy as Markdown
Other Tools
/* 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
<%namespace name="helpers" file="/helpers.mako.rs" />
${helpers.predefined_type(
"vector-effect",
"VectorEffect",
"computed::VectorEffect::none()",
engines="gecko",
animation_type="discrete",
affects="layout",
)}
// Section 14 - Gradients and Patterns
${helpers.predefined_type(
"stop-color",
"Color",
"computed::Color::BLACK",
engines="gecko",
affects="paint",
)}
${helpers.predefined_type(
"stop-opacity",
"Opacity",
"1.0",
engines="gecko",
affects="paint",
)}
// Filter Effects Module
${helpers.predefined_type(
"flood-color",
"Color",
"computed::Color::BLACK",
engines="gecko",
affects="paint",
)}
${helpers.predefined_type(
"flood-opacity",
"Opacity",
"1.0",
engines="gecko",
affects="paint",
)}
${helpers.predefined_type(
"lighting-color",
"Color",
"computed::Color::WHITE",
engines="gecko",
affects="paint",
)}
// CSS Masking Module Level 1
${helpers.single_keyword(
"mask-type",
"luminance alpha",
engines="gecko",
gecko_enum_prefix="StyleMaskType",
animation_type="discrete",
affects="paint",
)}
${helpers.predefined_type(
"clip-path",
"basic_shape::ClipPath",
"generics::basic_shape::ClipPath::None",
engines="gecko servo",
extra_prefixes="webkit",
affects="paint",
)}
${helpers.single_keyword(
"mask-mode",
"match-source alpha luminance",
engines="gecko",
gecko_enum_prefix="StyleMaskMode",
vector=True,
animation_type="discrete",
affects="paint",
)}
${helpers.predefined_type(
"mask-repeat",
"BackgroundRepeat",
"computed::BackgroundRepeat::repeat()",
engines="gecko",
initial_specified_value="specified::BackgroundRepeat::repeat()",
extra_prefixes="webkit",
animation_type="discrete",
vector=True,
affects="paint",
)}
% for (axis, direction) in [("x", "Horizontal"), ("y", "Vertical")]:
${helpers.predefined_type(
"mask-position-" + axis,
"position::" + direction + "Position",
"computed::LengthPercentage::zero_percent()",
engines="gecko",
extra_prefixes="webkit",
initial_specified_value="specified::PositionComponent::Center",
vector_animation_type="repeatable_list",
vector=True,
affects="paint",
)}
% endfor
${helpers.single_keyword(
"mask-clip",
"border-box content-box padding-box",
engines="gecko",
extra_gecko_values="fill-box stroke-box view-box no-clip",
vector=True,
extra_prefixes="webkit",
gecko_enum_prefix="StyleGeometryBox",
gecko_inexhaustive=True,
animation_type="discrete",
affects="paint",
)}
${helpers.single_keyword(
"mask-origin",
"border-box content-box padding-box",
engines="gecko",
extra_gecko_values="fill-box stroke-box view-box",
vector=True,
extra_prefixes="webkit",
gecko_enum_prefix="StyleGeometryBox",
gecko_inexhaustive=True,
animation_type="discrete",
affects="paint",
)}
${helpers.predefined_type(
"mask-size",
"background::BackgroundSize",
"computed::BackgroundSize::auto()",
engines="gecko",
initial_specified_value="specified::BackgroundSize::auto()",
extra_prefixes="webkit",
vector=True,
vector_animation_type="repeatable_list",
affects="paint",
)}
${helpers.single_keyword(
"mask-composite",
"add subtract intersect exclude",
engines="gecko",
gecko_enum_prefix="StyleMaskComposite",
vector=True,
extra_prefixes="webkit",
animation_type="discrete",
affects="paint",
)}
${helpers.predefined_type(
"mask-image",
"Image",
engines="gecko",
initial_value="computed::Image::None",
initial_specified_value="specified::Image::None",
parse_method="parse_with_cors_anonymous",
vector=True,
extra_prefixes="webkit",
animation_type="discrete",
affects="paint",
)}
${helpers.predefined_type(
"x",
"LengthPercentage",
"computed::LengthPercentage::zero()",
engines="gecko",
affects="layout",
)}
${helpers.predefined_type(
"y",
"LengthPercentage",
"computed::LengthPercentage::zero()",
engines="gecko",
affects="layout",
)}
${helpers.predefined_type(
"cx",
"LengthPercentage",
"computed::LengthPercentage::zero()",
engines="gecko",
affects="layout",
)}
${helpers.predefined_type(
"cy",
"LengthPercentage",
"computed::LengthPercentage::zero()",
engines="gecko",
affects="layout",
)}
${helpers.predefined_type(
"rx",
"NonNegativeLengthPercentageOrAuto",
"computed::NonNegativeLengthPercentageOrAuto::auto()",
engines="gecko",
affects="layout",
)}
${helpers.predefined_type(
"ry",
"NonNegativeLengthPercentageOrAuto",
"computed::NonNegativeLengthPercentageOrAuto::auto()",
engines="gecko",
affects="layout",
)}
${helpers.predefined_type(
"r",
"NonNegativeLengthPercentage",
"computed::NonNegativeLengthPercentage::zero()",
engines="gecko",
affects="layout",
)}
${helpers.predefined_type(
"d",
"DProperty",
"specified::DProperty::none()",
engines="gecko",
affects="layout",
)}