diff --git a/src/ExCSS.Tests/PropertyTests/FlexPropertyTests.cs b/src/ExCSS.Tests/PropertyTests/FlexPropertyTests.cs index 887ee15d..78a862e1 100644 --- a/src/ExCSS.Tests/PropertyTests/FlexPropertyTests.cs +++ b/src/ExCSS.Tests/PropertyTests/FlexPropertyTests.cs @@ -26,5 +26,19 @@ public void JustifyAlign_Parses() Assert.Equal(@"center", info.Style.AlignSelf); Assert.Equal(@"center", info.Style.JustifyContent); } + + [Fact] + public void FlexAuto_Parses() + { + string css = """ +html { + flex: auto; +} +"""; + + var stylesheet = new StylesheetParser().Parse(css); + var info = stylesheet.StyleRules.First() as ExCSS.StyleRule; + Assert.Equal(@"1 1 auto", info.Style.Flex); + } } } diff --git a/src/ExCSS/Model/Converters.cs b/src/ExCSS/Model/Converters.cs index ece72d2b..d450bb21 100644 --- a/src/ExCSS/Model/Converters.cs +++ b/src/ExCSS/Model/Converters.cs @@ -353,7 +353,7 @@ public static readonly IValueConverter public static readonly IValueConverter FlexConverter = Construct(() => { - var flexGrow = FlexGrowShrinkConverter.WithFallback(0).For(PropertyNames.FlexGrow); + var flexGrow = FlexGrowShrinkConverter.WithFallback(1).For(PropertyNames.FlexGrow); var flexShrink = FlexGrowShrinkConverter.WithFallback(1).For(PropertyNames.FlexShrink); var flexBasis = FlexBasisConverter.WithFallback(0).For(PropertyNames.FlexBasis);