@@ -3,6 +3,7 @@ use crate::values::macros::*;
33use crate :: values:: length:: { LengthPercentageOrAuto , LengthPercentage , Length , Percentage } ;
44use crate :: values:: traits:: { Parse , ToCss , PropertyHandler } ;
55use super :: Property ;
6+ use crate :: printer:: Printer ;
67
78/// https://www.w3.org/TR/2020/WD-css-align-3-20200421/#typedef-baseline-position
89#[ derive( Debug , Clone , PartialEq ) ]
@@ -33,7 +34,7 @@ impl Parse for BaselinePosition {
3334}
3435
3536impl ToCss for BaselinePosition {
36- fn to_css < W > ( & self , dest : & mut W ) -> std:: fmt:: Result where W : std:: fmt:: Write {
37+ fn to_css < W > ( & self , dest : & mut Printer < W > ) -> std:: fmt:: Result where W : std:: fmt:: Write {
3738 match self {
3839 BaselinePosition :: First => dest. write_str ( "baseline" ) ,
3940 BaselinePosition :: Last => dest. write_str ( "last baseline" )
@@ -94,7 +95,7 @@ impl Parse for AlignContent {
9495}
9596
9697impl ToCss for AlignContent {
97- fn to_css < W > ( & self , dest : & mut W ) -> std:: fmt:: Result where W : std:: fmt:: Write {
98+ fn to_css < W > ( & self , dest : & mut Printer < W > ) -> std:: fmt:: Result where W : std:: fmt:: Write {
9899 match self {
99100 AlignContent :: Normal => dest. write_str ( "normal" ) ,
100101 AlignContent :: BaselinePosition ( val) => val. to_css ( dest) ,
@@ -149,7 +150,7 @@ impl Parse for JustifyContent {
149150}
150151
151152impl ToCss for JustifyContent {
152- fn to_css < W > ( & self , dest : & mut W ) -> std:: fmt:: Result where W : std:: fmt:: Write {
153+ fn to_css < W > ( & self , dest : & mut Printer < W > ) -> std:: fmt:: Result where W : std:: fmt:: Write {
153154 match self {
154155 JustifyContent :: Normal => dest. write_str ( "normal" ) ,
155156 JustifyContent :: ContentDistribution ( val) => val. to_css ( dest) ,
@@ -211,7 +212,7 @@ impl Parse for PlaceContent {
211212}
212213
213214impl ToCss for PlaceContent {
214- fn to_css < W > ( & self , dest : & mut W ) -> std:: fmt:: Result where W : std:: fmt:: Write {
215+ fn to_css < W > ( & self , dest : & mut Printer < W > ) -> std:: fmt:: Result where W : std:: fmt:: Write {
215216 self . align . to_css ( dest) ?;
216217 let is_equal = match self . justify {
217218 JustifyContent :: Normal if self . align == AlignContent :: Normal => true ,
@@ -275,7 +276,7 @@ impl Parse for AlignSelf {
275276}
276277
277278impl ToCss for AlignSelf {
278- fn to_css < W > ( & self , dest : & mut W ) -> std:: fmt:: Result where W : std:: fmt:: Write {
279+ fn to_css < W > ( & self , dest : & mut Printer < W > ) -> std:: fmt:: Result where W : std:: fmt:: Write {
279280 match self {
280281 AlignSelf :: Auto => dest. write_str ( "auto" ) ,
281282 AlignSelf :: Normal => dest. write_str ( "normal" ) ,
@@ -341,7 +342,7 @@ impl Parse for JustifySelf {
341342}
342343
343344impl ToCss for JustifySelf {
344- fn to_css < W > ( & self , dest : & mut W ) -> std:: fmt:: Result where W : std:: fmt:: Write {
345+ fn to_css < W > ( & self , dest : & mut Printer < W > ) -> std:: fmt:: Result where W : std:: fmt:: Write {
345346 match self {
346347 JustifySelf :: Auto => dest. write_str ( "auto" ) ,
347348 JustifySelf :: Normal => dest. write_str ( "normal" ) ,
@@ -404,7 +405,7 @@ impl Parse for PlaceSelf {
404405}
405406
406407impl ToCss for PlaceSelf {
407- fn to_css < W > ( & self , dest : & mut W ) -> std:: fmt:: Result where W : std:: fmt:: Write {
408+ fn to_css < W > ( & self , dest : & mut Printer < W > ) -> std:: fmt:: Result where W : std:: fmt:: Write {
408409 self . align . to_css ( dest) ?;
409410 let is_equal = match & self . justify {
410411 JustifySelf :: Auto => true ,
@@ -454,7 +455,7 @@ impl Parse for AlignItems {
454455}
455456
456457impl ToCss for AlignItems {
457- fn to_css < W > ( & self , dest : & mut W ) -> std:: fmt:: Result where W : std:: fmt:: Write {
458+ fn to_css < W > ( & self , dest : & mut Printer < W > ) -> std:: fmt:: Result where W : std:: fmt:: Write {
458459 match self {
459460 AlignItems :: Normal => dest. write_str ( "normal" ) ,
460461 AlignItems :: Stretch => dest. write_str ( "stretch" ) ,
@@ -515,7 +516,7 @@ impl Parse for LegacyJustify {
515516}
516517
517518impl ToCss for LegacyJustify {
518- fn to_css < W > ( & self , dest : & mut W ) -> std:: fmt:: Result where W : std:: fmt:: Write {
519+ fn to_css < W > ( & self , dest : & mut Printer < W > ) -> std:: fmt:: Result where W : std:: fmt:: Write {
519520 dest. write_str ( "legacy " ) ?;
520521 match self {
521522 LegacyJustify :: Left => dest. write_str ( "left" ) ,
@@ -573,7 +574,7 @@ impl Parse for JustifyItems {
573574}
574575
575576impl ToCss for JustifyItems {
576- fn to_css < W > ( & self , dest : & mut W ) -> std:: fmt:: Result where W : std:: fmt:: Write {
577+ fn to_css < W > ( & self , dest : & mut Printer < W > ) -> std:: fmt:: Result where W : std:: fmt:: Write {
577578 match self {
578579 JustifyItems :: Normal => dest. write_str ( "normal" ) ,
579580 JustifyItems :: Stretch => dest. write_str ( "stretch" ) ,
@@ -635,7 +636,7 @@ impl Parse for PlaceItems {
635636}
636637
637638impl ToCss for PlaceItems {
638- fn to_css < W > ( & self , dest : & mut W ) -> std:: fmt:: Result where W : std:: fmt:: Write {
639+ fn to_css < W > ( & self , dest : & mut Printer < W > ) -> std:: fmt:: Result where W : std:: fmt:: Write {
639640 self . align . to_css ( dest) ?;
640641 let is_equal = match & self . justify {
641642 JustifyItems :: Normal => self . align == AlignItems :: Normal ,
@@ -673,7 +674,7 @@ impl Parse for GapValue {
673674}
674675
675676impl ToCss for GapValue {
676- fn to_css < W > ( & self , dest : & mut W ) -> std:: fmt:: Result where W : std:: fmt:: Write {
677+ fn to_css < W > ( & self , dest : & mut Printer < W > ) -> std:: fmt:: Result where W : std:: fmt:: Write {
677678 match self {
678679 GapValue :: Normal => dest. write_str ( "normal" ) ,
679680 GapValue :: LengthPercentage ( lp) => lp. to_css ( dest)
@@ -697,7 +698,7 @@ impl Parse for Gap {
697698}
698699
699700impl ToCss for Gap {
700- fn to_css < W > ( & self , dest : & mut W ) -> std:: fmt:: Result where W : std:: fmt:: Write {
701+ fn to_css < W > ( & self , dest : & mut Printer < W > ) -> std:: fmt:: Result where W : std:: fmt:: Write {
701702 self . row . to_css ( dest) ?;
702703 if self . column != self . row {
703704 dest. write_str ( " " ) ?;
0 commit comments