mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Add spec links for outline properties
This commit is contained in:
parent
fdd6a409fb
commit
e7464b5fd5
2 changed files with 15 additions and 9 deletions
|
@ -11,9 +11,11 @@
|
|||
|
||||
// TODO(pcwalton): `invert`
|
||||
${helpers.predefined_type("outline-color", "CSSColor", "::cssparser::Color::CurrentColor",
|
||||
animatable=True, complex_color=True, need_clone=True)}
|
||||
animatable=True, complex_color=True, need_clone=True,
|
||||
spec="https://drafts.csswg.org/css-ui/#propdef-outline-color")}
|
||||
|
||||
<%helpers:longhand name="outline-style" need_clone="True" animatable="False">
|
||||
<%helpers:longhand name="outline-style" need_clone="True" animatable="False"
|
||||
spec="https://drafts.csswg.org/css-ui/#propdef-outline-style">
|
||||
pub use values::specified::BorderStyle as SpecifiedValue;
|
||||
pub fn get_initial_value() -> SpecifiedValue { SpecifiedValue::none }
|
||||
pub mod computed_value {
|
||||
|
@ -27,7 +29,8 @@ ${helpers.predefined_type("outline-color", "CSSColor", "::cssparser::Color::Curr
|
|||
}
|
||||
</%helpers:longhand>
|
||||
|
||||
<%helpers:longhand name="outline-width" animatable="True">
|
||||
<%helpers:longhand name="outline-width" animatable="True"
|
||||
spec="https://drafts.csswg.org/css-ui/#propdef-outline-width">
|
||||
use app_units::Au;
|
||||
use std::fmt;
|
||||
use style_traits::ToCss;
|
||||
|
@ -77,9 +80,11 @@ ${helpers.predefined_type("outline-color", "CSSColor", "::cssparser::Color::Curr
|
|||
// TODO: Should they animate?
|
||||
% for corner in ["topleft", "topright", "bottomright", "bottomleft"]:
|
||||
${helpers.predefined_type("-moz-outline-radius-" + corner, "BorderRadiusSize",
|
||||
"computed::BorderRadiusSize::zero()",
|
||||
"parse", products="gecko",
|
||||
animatable=False)}
|
||||
"computed::BorderRadiusSize::zero()",
|
||||
"parse", products="gecko",
|
||||
animatable=False,
|
||||
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-outline-radius)")}
|
||||
% endfor
|
||||
|
||||
${helpers.predefined_type("outline-offset", "Length", "Au(0)", products="servo", animatable=True)}
|
||||
${helpers.predefined_type("outline-offset", "Length", "Au(0)", products="servo", animatable=True,
|
||||
spec="https://drafts.csswg.org/css-ui/#propdef-outline-offset")}
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
|
||||
<%namespace name="helpers" file="/helpers.mako.rs" />
|
||||
|
||||
<%helpers:shorthand name="outline" sub_properties="outline-color outline-style outline-width">
|
||||
<%helpers:shorthand name="outline" sub_properties="outline-color outline-style outline-width"
|
||||
spec="https://drafts.csswg.org/css-ui/#propdef-outline">
|
||||
use properties::longhands::outline_width;
|
||||
use values::specified;
|
||||
use parser::Parse;
|
||||
|
@ -75,7 +76,7 @@
|
|||
<%helpers:shorthand name="-moz-outline-radius" sub_properties="${' '.join(
|
||||
'-moz-outline-radius-%s' % corner
|
||||
for corner in ['topleft', 'topright', 'bottomright', 'bottomleft']
|
||||
)}" products="gecko">
|
||||
)}" products="gecko" spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-outline-radius)">
|
||||
use properties::shorthands;
|
||||
|
||||
pub fn parse_value(context: &ParserContext, input: &mut Parser) -> Result<Longhands, ()> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue