Move #[css(iterable)] on fields rather than variants

This commit is contained in:
Anthony Ramine 2018-03-06 10:03:15 +01:00
parent f5393cef8d
commit 85950a801f
10 changed files with 44 additions and 51 deletions

View file

@ -126,9 +126,7 @@
% endif
% if not allow_empty:
% if separator == "Comma":
#[css(comma, iterable)]
% else:
#[css(iterable)]
#[css(comma)]
% endif
#[derive(ToCss)]
% endif
@ -136,6 +134,9 @@
% if allow_empty and allow_empty != "NotInitial":
pub Vec<single_value::T>,
% else:
% if not allow_empty:
#[css(iterable)]
% endif
pub SmallVec<[single_value::T; 1]>,
% endif
);
@ -189,13 +190,16 @@
#[derive(Clone, Debug, MallocSizeOf, PartialEq)]
% if not allow_empty:
% if separator == "Comma":
#[css(comma, iterable)]
% else:
#[css(iterable)]
#[css(comma)]
% endif
#[derive(ToCss)]
% endif
pub struct SpecifiedValue(pub Vec<single_value::SpecifiedValue>);
pub struct SpecifiedValue(
% if not allow_empty:
#[css(iterable)]
% endif
pub Vec<single_value::SpecifiedValue>,
);
% if allow_empty:
impl ToCss for SpecifiedValue {