Auto merge of #20211 - servo:derive-all-the-things, r=emilio

Improve #[derive(ToCss)]

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20211)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-03-06 11:42:58 -05:00 committed by GitHub
commit 785b7c7775
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 146 additions and 111 deletions

View file

@ -369,9 +369,9 @@ pub enum OverflowClipBox {
pub enum WillChange {
/// Expresses no particular intent
Auto,
#[css(comma, iterable)]
/// <custom-ident>
AnimateableFeatures(Box<[CustomIdent]>),
#[css(comma)]
AnimateableFeatures(#[css(iterable)] Box<[CustomIdent]>),
}
impl WillChange {

View file

@ -92,8 +92,7 @@ pub enum Content {
#[cfg(feature = "gecko")]
MozAltContent,
/// Content items.
#[css(iterable)]
Items(Box<[ContentItem]>),
Items(#[css(iterable)] Box<[ContentItem]>),
}
/// Items for the `content` property.

View file

@ -152,8 +152,8 @@ impl From<LengthOrPercentage> for FontSize {
#[derive(Clone, Debug, Eq, Hash, PartialEq, ToCss)]
pub enum FontFamily {
/// List of `font-family`
#[css(iterable, comma)]
Values(FontFamilyList),
#[css(comma)]
Values(#[css(iterable)] FontFamilyList),
/// System font
System(SystemFont),
}
@ -718,11 +718,11 @@ pub enum VariantAlternates {
#[css(function)]
Stylistic(CustomIdent),
/// Enables display with stylistic sets
#[css(comma, function, iterable)]
Styleset(Box<[CustomIdent]>),
#[css(comma, function)]
Styleset(#[css(iterable)] Box<[CustomIdent]>),
/// Enables display of specific character variants
#[css(comma, function, iterable)]
CharacterVariant(Box<[CustomIdent]>),
#[css(comma, function)]
CharacterVariant(#[css(iterable)] Box<[CustomIdent]>),
/// Enables display of swash glyphs
#[css(function)]
Swash(CustomIdent),