@@ -75,13 +75,15 @@ impl ToCss for BackgroundSize {
7575 }
7676}
7777
78- // https://www.w3.org/TR/css-backgrounds-3/#typedef-repeat-style
79- enum_property ! ( BackgroundRepeatKeyword ,
80- ( "repeat" , Repeat ) ,
81- ( "space" , Space ) ,
82- ( "round" , Round ) ,
83- ( "no-repeat" , NoRepeat )
84- ) ;
78+ enum_property ! {
79+ /// https://www.w3.org/TR/css-backgrounds-3/#typedef-repeat-style
80+ pub enum BackgroundRepeatKeyword {
81+ "repeat" : Repeat ,
82+ "space" : Space ,
83+ "round" : Round ,
84+ "no-repeat" : NoRepeat ,
85+ }
86+ }
8587
8688/// https://www.w3.org/TR/css-backgrounds-3/#background-repeat
8789#[ derive( Debug , Clone , PartialEq ) ]
@@ -137,34 +139,40 @@ impl ToCss for BackgroundRepeat {
137139 }
138140}
139141
140- // https://www.w3.org/TR/css-backgrounds-3/#background-attachment
141- enum_property ! ( BackgroundAttachment ,
142- Scroll ,
143- Fixed ,
144- Local
145- ) ;
142+ enum_property ! {
143+ /// https://www.w3.org/TR/css-backgrounds-3/#background-attachment
144+ pub enum BackgroundAttachment {
145+ Scroll ,
146+ Fixed ,
147+ Local ,
148+ }
149+ }
146150
147151impl Default for BackgroundAttachment {
148152 fn default ( ) -> BackgroundAttachment {
149153 BackgroundAttachment :: Scroll
150154 }
151155}
152156
153- // https://www.w3.org/TR/css-backgrounds-3/#typedef-box
154- enum_property ! ( BackgroundBox ,
155- ( "border-box" , BorderBox ) ,
156- ( "padding-box" , PaddingBox ) ,
157- ( "content-box" , ContentBox )
158- ) ;
159-
160- // https://drafts.csswg.org/css-backgrounds-4/#background-clip
161- enum_property ! ( BackgroundClip ,
162- ( "border-box" , BorderBox ) ,
163- ( "padding-box" , PaddingBox ) ,
164- ( "content-box" , ContentBox ) ,
165- ( "border" , Border ) ,
166- ( "text" , Text )
167- ) ;
157+ enum_property ! {
158+ /// https://www.w3.org/TR/css-backgrounds-3/#typedef-box
159+ pub enum BackgroundBox {
160+ "border-box" : BorderBox ,
161+ "padding-box" : PaddingBox ,
162+ "content-box" : ContentBox ,
163+ }
164+ }
165+
166+ enum_property ! {
167+ /// https://drafts.csswg.org/css-backgrounds-4/#background-clip
168+ pub enum BackgroundClip {
169+ "border-box" : BorderBox ,
170+ "padding-box" : PaddingBox ,
171+ "content-box" : ContentBox ,
172+ "border" : Border ,
173+ "text" : Text ,
174+ }
175+ }
168176
169177impl PartialEq < BackgroundBox > for BackgroundClip {
170178 fn eq ( & self , other : & BackgroundBox ) -> bool {
0 commit comments