mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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`
|
// TODO(pcwalton): `invert`
|
||||||
${helpers.predefined_type("outline-color", "CSSColor", "::cssparser::Color::CurrentColor",
|
${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 use values::specified::BorderStyle as SpecifiedValue;
|
||||||
pub fn get_initial_value() -> SpecifiedValue { SpecifiedValue::none }
|
pub fn get_initial_value() -> SpecifiedValue { SpecifiedValue::none }
|
||||||
pub mod computed_value {
|
pub mod computed_value {
|
||||||
|
@ -27,7 +29,8 @@ ${helpers.predefined_type("outline-color", "CSSColor", "::cssparser::Color::Curr
|
||||||
}
|
}
|
||||||
</%helpers:longhand>
|
</%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 app_units::Au;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use style_traits::ToCss;
|
use style_traits::ToCss;
|
||||||
|
@ -77,9 +80,11 @@ ${helpers.predefined_type("outline-color", "CSSColor", "::cssparser::Color::Curr
|
||||||
// TODO: Should they animate?
|
// TODO: Should they animate?
|
||||||
% for corner in ["topleft", "topright", "bottomright", "bottomleft"]:
|
% for corner in ["topleft", "topright", "bottomright", "bottomleft"]:
|
||||||
${helpers.predefined_type("-moz-outline-radius-" + corner, "BorderRadiusSize",
|
${helpers.predefined_type("-moz-outline-radius-" + corner, "BorderRadiusSize",
|
||||||
"computed::BorderRadiusSize::zero()",
|
"computed::BorderRadiusSize::zero()",
|
||||||
"parse", products="gecko",
|
"parse", products="gecko",
|
||||||
animatable=False)}
|
animatable=False,
|
||||||
|
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-outline-radius)")}
|
||||||
% endfor
|
% 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" />
|
<%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 properties::longhands::outline_width;
|
||||||
use values::specified;
|
use values::specified;
|
||||||
use parser::Parse;
|
use parser::Parse;
|
||||||
|
@ -75,7 +76,7 @@
|
||||||
<%helpers:shorthand name="-moz-outline-radius" sub_properties="${' '.join(
|
<%helpers:shorthand name="-moz-outline-radius" sub_properties="${' '.join(
|
||||||
'-moz-outline-radius-%s' % corner
|
'-moz-outline-radius-%s' % corner
|
||||||
for corner in ['topleft', 'topright', 'bottomright', 'bottomleft']
|
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;
|
use properties::shorthands;
|
||||||
|
|
||||||
pub fn parse_value(context: &ParserContext, input: &mut Parser) -> Result<Longhands, ()> {
|
pub fn parse_value(context: &ParserContext, input: &mut Parser) -> Result<Longhands, ()> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue