Add spec links for column properties

This commit is contained in:
Manish Goregaokar 2017-01-02 15:53:51 -08:00
parent 6a88723409
commit dedebc5cb5
2 changed files with 20 additions and 12 deletions

View file

@ -12,11 +12,13 @@ ${helpers.predefined_type("column-width",
"Either::Second(Auto)", "Either::Second(Auto)",
parse_method="parse_non_negative_length", parse_method="parse_non_negative_length",
animatable=False, animatable=False,
experimental=True)} experimental=True,
spec="https://drafts.csswg.org/css-multicol/#propdef-column-width")}
// FIXME: This prop should be animatable. // FIXME: This prop should be animatable.
<%helpers:longhand name="column-count" experimental="True" animatable="False"> <%helpers:longhand name="column-count" experimental="True" animatable="False"
spec="https://drafts.csswg.org/css-multicol/#propdef-column-count">
use std::fmt; use std::fmt;
use style_traits::ToCss; use style_traits::ToCss;
use values::NoViewportPercentage; use values::NoViewportPercentage;
@ -101,13 +103,16 @@ ${helpers.predefined_type("column-gap",
"Either::Second(Normal)", "Either::Second(Normal)",
parse_method='parse_non_negative_length', parse_method='parse_non_negative_length',
experimental=True, experimental=True,
animatable=False)} animatable=False,
spec="https://drafts.csswg.org/css-multicol/#propdef-column-gap")}
${helpers.single_keyword("column-fill", "auto balance", ${helpers.single_keyword("column-fill", "auto balance",
products="gecko", animatable=False)} products="gecko", animatable=False,
spec="https://drafts.csswg.org/css-multicol/#propdef-column-gap")}
// https://drafts.csswg.org/css-multicol-1/#propdef-column-rule-width // https://drafts.csswg.org/css-multicol-1/#propdef-column-rule-width
<%helpers:longhand name="column-rule-width" products="gecko" animatable="True"> <%helpers:longhand name="column-rule-width" products="gecko" animatable="True"
spec="https://drafts.csswg.org/css-multicol/#propdef-column-rule-width">
use app_units::Au; use app_units::Au;
use std::fmt; use std::fmt;
use style_traits::ToCss; use style_traits::ToCss;
@ -140,15 +145,17 @@ ${helpers.single_keyword("column-fill", "auto balance",
${helpers.predefined_type("column-rule-color", "CSSColor", ${helpers.predefined_type("column-rule-color", "CSSColor",
"::cssparser::Color::CurrentColor", "::cssparser::Color::CurrentColor",
products="gecko", animatable=True, products="gecko", animatable=True,
complex_color=True, need_clone=True)} complex_color=True, need_clone=True,
spec="https://drafts.csswg.org/css-multicol/#propdef-column-rule-color")}
// It's not implemented in servo or gecko yet. // It's not implemented in servo or gecko yet.
// https://drafts.csswg.org/css-multicol-1/#column-span
${helpers.single_keyword("column-span", "none all", ${helpers.single_keyword("column-span", "none all",
products="none", animatable=False)} products="none", animatable=False,
spec="https://drafts.csswg.org/css-multicol/#propdef-column-span")}
${helpers.single_keyword("column-rule-style", ${helpers.single_keyword("column-rule-style",
"none hidden dotted dashed solid double groove ridge inset outset", "none hidden dotted dashed solid double groove ridge inset outset",
products="gecko", products="gecko",
gecko_constant_prefix="NS_STYLE_BORDER_STYLE", gecko_constant_prefix="NS_STYLE_BORDER_STYLE",
animatable=False)} animatable=False,
spec="https://drafts.csswg.org/css-multicol/#propdef-column-rule-style")}

View file

@ -4,7 +4,8 @@
<%namespace name="helpers" file="/helpers.mako.rs" /> <%namespace name="helpers" file="/helpers.mako.rs" />
<%helpers:shorthand name="columns" sub_properties="column-count column-width" experimental="True"> <%helpers:shorthand name="columns" sub_properties="column-count column-width" experimental="True"
spec="https://drafts.csswg.org/css-multicol/#propdef-columns">
use properties::longhands::{column_count, column_width}; use properties::longhands::{column_count, column_width};
pub fn parse_value(context: &ParserContext, input: &mut Parser) -> Result<Longhands, ()> { pub fn parse_value(context: &ParserContext, input: &mut Parser) -> Result<Longhands, ()> {
@ -58,9 +59,9 @@
} }
</%helpers:shorthand> </%helpers:shorthand>
// https://drafts.csswg.org/css-multicol/#column-rule
<%helpers:shorthand name="column-rule" products="gecko" <%helpers:shorthand name="column-rule" products="gecko"
sub_properties="column-rule-width column-rule-style column-rule-color"> sub_properties="column-rule-width column-rule-style column-rule-color"
spec="https://drafts.csswg.org/css-multicol/#propdef-column-rule">
use properties::longhands::{column_rule_width, column_rule_style}; use properties::longhands::{column_rule_width, column_rule_style};
use properties::longhands::column_rule_color; use properties::longhands::column_rule_color;