-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* AlignContent * AlignItems * AlignSelf * FlexBasis * JustifyContent * JustifyItems * JustifySelf * PlaceContent * PlaceItems * PlaceSelf * Overflow * FontSmoothing * LineHeight * WordBreak
- Loading branch information
1 parent
67292f5
commit 87d0220
Showing
25 changed files
with
614 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System.Collections.Immutable; | ||
|
||
namespace MonorailCss.Plugins.Effects; | ||
|
||
/// <summary> | ||
/// The opacity plugin. | ||
/// </summary> | ||
public class Opacity : BaseUtilityPlugin | ||
{ | ||
/// <inheritdoc /> | ||
protected override string Property => "opacity"; | ||
|
||
protected override ImmutableDictionary<string, string> Utilities => new Dictionary<string, string>() | ||
{ | ||
{ "opacity-0", "0" }, | ||
{ "opacity-5", "0.05" }, | ||
{ "opacity-10", "0.1" }, | ||
{ "opacity-20", "0.2" }, | ||
{ "opacity-25", "0.25" }, | ||
{ "opacity-30", "0.3" }, | ||
{ "opacity-40", "0.4" }, | ||
{ "opacity-50", "0.5" }, | ||
{ "opacity-60", "0.6" }, | ||
{ "opacity-70", "0.7" }, | ||
{ "opacity-75", "0.75" }, | ||
{ "opacity-80", "0.8" }, | ||
{ "opacity-90", "0.9" }, | ||
{ "opacity-95", "0.95" }, | ||
{ "opacity-100", "1" }, | ||
}.ToImmutableDictionary(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System.Collections.Immutable; | ||
|
||
namespace MonorailCss.Plugins.FlexBoxAndGrid; | ||
|
||
/// <summary> | ||
/// The align-content plugin. | ||
/// </summary> | ||
public class AlignContent : BaseUtilityPlugin | ||
{ | ||
/// <inheritdoc /> | ||
protected override string Property => "align-content"; | ||
|
||
/// <inheritdoc /> | ||
protected override ImmutableDictionary<string, string> Utilities => new Dictionary<string, string> | ||
{ | ||
{ "content-center", "center" }, | ||
{ "content-start", "flex-start" }, | ||
{ "content-end", "flex-end" }, | ||
{ "content-between", "space-between" }, | ||
{ "content-around", "space-around" }, | ||
{ "content-evenly", "space-evenly" }, | ||
}.ToImmutableDictionary(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System.Collections.Immutable; | ||
|
||
namespace MonorailCss.Plugins.FlexBoxAndGrid; | ||
|
||
/// <summary> | ||
/// The align-items plugin. | ||
/// </summary> | ||
public class AlignItems : BaseUtilityPlugin | ||
{ | ||
/// <inheritdoc /> | ||
protected override string Property => "align-items"; | ||
|
||
/// <inheritdoc /> | ||
protected override ImmutableDictionary<string, string> Utilities => new Dictionary<string, string> | ||
{ | ||
{ "items-start", "flex-start" }, | ||
{ "items-end", "flex-end" }, | ||
{ "items-center", "center" }, | ||
{ "items-baseline", "baseline" }, | ||
{ "items-stretch", "stretch" }, | ||
}.ToImmutableDictionary(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System.Collections.Immutable; | ||
|
||
namespace MonorailCss.Plugins.FlexBoxAndGrid; | ||
|
||
/// <summary> | ||
/// The align-self plugin. | ||
/// </summary> | ||
public class AlignSelf : BaseUtilityPlugin | ||
{ | ||
/// <inheritdoc /> | ||
protected override string Property => "align-self"; | ||
|
||
/// <inheritdoc /> | ||
protected override ImmutableDictionary<string, string> Utilities => new Dictionary<string, string> | ||
{ | ||
{ "self-auto", "auto" }, | ||
{ "self-start", "flex-start" }, | ||
{ "self-end", "flex-end" }, | ||
{ "self-center", "center" }, | ||
{ "self-stretch", "stretch" }, | ||
{ "self-baseline", "baseline" }, | ||
}.ToImmutableDictionary(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
namespace MonorailCss.Plugins.FlexBoxAndGrid; | ||
|
||
/// <summary> | ||
/// The flex-basis plugin. | ||
/// </summary> | ||
public class FlexBasis : BaseUtilityNamespacePlugin | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="FlexBasis"/> class. | ||
/// </summary> | ||
/// <param name="designSystem">The design system</param> | ||
public FlexBasis(DesignSystem designSystem) | ||
{ | ||
Values = designSystem.Spacing.AddRange(SizeHelpers.Percentages).Add("auto", "auto"); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override CssNamespaceToPropertyMap NamespacePropertyMapList => new() | ||
{ | ||
{ "basis", "flex-basis" }, | ||
}; | ||
|
||
/// <inheritdoc /> | ||
protected override CssSuffixToValueMap Values { get; } | ||
} | ||
|
||
/// <summary> | ||
/// The gap plugin. | ||
/// </summary> | ||
public class Gap : BaseUtilityNamespacePlugin | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Gap"/> class. | ||
/// </summary> | ||
/// <param name="designSystem">The design system.</param> | ||
public Gap(DesignSystem designSystem) | ||
{ | ||
Values = designSystem.Spacing; | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override CssNamespaceToPropertyMap NamespacePropertyMapList => new() | ||
{ | ||
{ "gap", "gap" }, | ||
{ "gap-x", "column-gap" }, | ||
{ "gap-y", "row-gap" }, | ||
}; | ||
|
||
/// <inheritdoc /> | ||
protected override CssSuffixToValueMap Values { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System.Collections.Immutable; | ||
|
||
namespace MonorailCss.Plugins.FlexBoxAndGrid; | ||
|
||
/// <summary> | ||
/// The flex-direction plugin. | ||
/// </summary> | ||
public class FlexDirection : BaseUtilityPlugin | ||
{ | ||
/// <inheritdoc /> | ||
protected override string Property => "flex-direction"; | ||
|
||
/// <inheritdoc /> | ||
protected override ImmutableDictionary<string, string> Utilities => | ||
new Dictionary<string, string>() | ||
{ | ||
{ "flex-row", "row" }, | ||
{ "flex-row-reverse", "row-reverse" }, | ||
{ "flex-col", "column" }, | ||
{ "flex-col-reverse", "column-reverse" }, | ||
}.ToImmutableDictionary(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System.Collections.Immutable; | ||
|
||
namespace MonorailCss.Plugins.FlexBoxAndGrid; | ||
|
||
/// <summary> | ||
/// The flex-grow plugin. | ||
/// </summary> | ||
public class FlexGrow : BaseUtilityPlugin | ||
{ | ||
/// <inheritdoc /> | ||
protected override string Property => "flex-grow"; | ||
|
||
/// <inheritdoc /> | ||
protected override ImmutableDictionary<string, string> Utilities => | ||
new Dictionary<string, string>() { { "grow", "1" }, { "grow-0", "0" }, }.ToImmutableDictionary(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System.Collections.Immutable; | ||
|
||
namespace MonorailCss.Plugins.FlexBoxAndGrid; | ||
|
||
/// <summary> | ||
/// The flex-shrink plugin. | ||
/// </summary> | ||
public class FlexShrink : BaseUtilityPlugin | ||
{ | ||
/// <inheritdoc /> | ||
protected override string Property => "flex-shrink"; | ||
|
||
/// <inheritdoc /> | ||
protected override ImmutableDictionary<string, string> Utilities => | ||
new Dictionary<string, string>() { { "shrink", "1" }, { "shrink-0", "0" }, }.ToImmutableDictionary(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.Collections.Immutable; | ||
|
||
namespace MonorailCss.Plugins.FlexBoxAndGrid; | ||
|
||
/// <summary> | ||
/// The flex-shrink plugin. | ||
/// </summary> | ||
public class FlexWrap : BaseUtilityPlugin | ||
{ | ||
/// <inheritdoc /> | ||
protected override string Property => "flex-wrap"; | ||
|
||
/// <inheritdoc /> | ||
protected override ImmutableDictionary<string, string> Utilities => | ||
new Dictionary<string, string>() | ||
{ | ||
{ "flex-wrap", "wrap" }, | ||
{ "flex-wrap-reverse", "wrap-reverse" }, | ||
{ "flex-nowrap", "nowrap" }, | ||
}.ToImmutableDictionary(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System.Collections.Immutable; | ||
|
||
namespace MonorailCss.Plugins.FlexBoxAndGrid; | ||
|
||
/// <summary> | ||
/// The justify-content plugin. | ||
/// </summary> | ||
public class JustifyContent : BaseUtilityPlugin | ||
{ | ||
/// <inheritdoc /> | ||
protected override string Property => "justify-content"; | ||
|
||
/// <inheritdoc /> | ||
protected override ImmutableDictionary<string, string> Utilities => new Dictionary<string, string>() | ||
{ | ||
{ "justify-start", "flex-start" }, | ||
{ "justify-end", "flex-end" }, | ||
{ "justify-center", "center" }, | ||
{ "justify-between", "space-between" }, | ||
{ "justify-around", "space-around" }, | ||
{ "justify-evenly", "space-evenly" }, | ||
}.ToImmutableDictionary(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.Collections.Immutable; | ||
|
||
namespace MonorailCss.Plugins.FlexBoxAndGrid; | ||
|
||
/// <summary> | ||
/// The justify-items plugin. | ||
/// </summary> | ||
public class JustifyItems : BaseUtilityPlugin | ||
{ | ||
/// <inheritdoc /> | ||
protected override string Property => "justify-items"; | ||
|
||
/// <inheritdoc /> | ||
protected override ImmutableDictionary<string, string> Utilities => new Dictionary<string, string>() | ||
{ | ||
{ "justify-items-start", "start" }, | ||
{ "justify-items-end", "end" }, | ||
{ "justify-items-center", "center" }, | ||
{ "justify-items-stretch", "stretch" }, | ||
}.ToImmutableDictionary(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System.Collections.Immutable; | ||
|
||
namespace MonorailCss.Plugins.FlexBoxAndGrid; | ||
|
||
/// <summary> | ||
/// The justify-self plugin. | ||
/// </summary> | ||
public class JustifySelf : BaseUtilityPlugin | ||
{ | ||
/// <inheritdoc /> | ||
protected override string Property => "justify-self"; | ||
|
||
/// <inheritdoc /> | ||
protected override ImmutableDictionary<string, string> Utilities => new Dictionary<string, string>() | ||
{ | ||
{ "justify-self-auto", "auto" }, | ||
{ "justify-self-start", "start" }, | ||
{ "justify-self-end", "end" }, | ||
{ "justify-self-center", "center" }, | ||
{ "justify-self-stretch", "stretch" }, | ||
}.ToImmutableDictionary(); | ||
} |
Oops, something went wrong.