Skip to content

Commit

Permalink
Fixes issue with flex-row not being recognized.
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-scott-78 committed Apr 9, 2022
1 parent f768e23 commit 4e4c7b5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/MonorailCss/Plugins/FlexBoxAndGrid/Flex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ public class FlexDirection : BaseUtilityPlugin
protected override ImmutableDictionary<string, string> Utilities =>
new Dictionary<string, string>()
{
{ "flex-row ", "row" },
{ "flex-row", "row" },
{ "flex-row-reverse", "row-reverse" },
{ "flex-col", "col" },
{ "flex-col-reverse", "col-reverse" },
{ "flex-col", "column" },
{ "flex-col-reverse", "column-reverse" },
}.ToImmutableDictionary();
}

Expand Down
21 changes: 21 additions & 0 deletions test/MonorailCss.Tests/Plugins/Flex/FlexDirectionTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
namespace MonorailCss.Tests.Plugins.Flex;

public class FlexDirectionTests
{
[Fact]
public void Can_do_flex_direction()
{
var framework = new CssFramework(MonorailCss.DesignSystem.Default).WithCssReset(string.Empty);
var r =framework.Process(new[] {"flex-col", "md:flex-row"});
r.ShouldBeCss(@"
.flex-col {
flex-direction:column;
}
@media (min-width:768px) {
.md\:flex-row {
flex-direction:row;
}
}
");
}
}

0 comments on commit 4e4c7b5

Please sign in to comment.