/// <summary> /// Applies the justify-content rule to the current flex definition. /// </summary> /// <param name="justifyContent">Justify-content to be apply.</param> /// <returns>Next rule reference.</returns> public IFluentFlexAll WithJustifyContent(FlexJustifyContent justifyContent) { currentFlexDefinition = GetDefinition(); currentFlexDefinition.JustifyContent = justifyContent; Dirty(); return(this); }
public static string ToCssClass(this FlexJustifyContent justifyContent, Breakpoint breakpoint) { return(justifyContent == FlexJustifyContent.None ? string.Empty : new CssClassBuilder("justify-content") .Append(() => breakpoint.GetCssClassPart(), () => breakpoint != Breakpoint.None) .Append(() => justifyContent.GetCssClassPart(), () => justifyContent != FlexJustifyContent.None) .Build()); }
public void AreJustifyContent(string expected, FlexJustifyContent justifyContent) { var flex = new FluentFlex(); flex.WithFlexType(FlexType.Flex); flex.WithJustifyContent(justifyContent); var classname = flex.Class(classProvider); Assert.Equal(expected, classname); }
private static FlexOptions ToFlexOptions(FlexJustifyContent justifyContent) { return(new FlexOptions { JustifyContent = justifyContent }); }
public void ToCssClassSucceeds(FlexJustifyContent justifyContent, Breakpoint breakpoint, string expected) { justifyContent.ToCssClass(breakpoint).Should().Be(expected); }