From ba8d626f380f7ed6e75b4152100b3150329c21dd Mon Sep 17 00:00:00 2001 From: Dzuk <32108484+dzuk-mutant@users.noreply.github.com> Date: Tue, 16 Nov 2021 23:27:01 +0000 Subject: [PATCH 1/8] Adds base borderBlock/Inline functions Just the one-liners with 1, 2 and 3-argument variants. --- src/Css.elm | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/src/Css.elm b/src/Css.elm index d4ab3dee..5eaf820a 100644 --- a/src/Css.elm +++ b/src/Css.elm @@ -30,6 +30,8 @@ module Css exposing , borderRight, borderRight2, borderRight3 , borderBottom, borderBottom2, borderBottom3 , borderLeft, borderLeft2, borderLeft3 + , borderBlock, borderBlock2, borderBlock3 + , borderInline, borderInline2, borderInline3 , borderWidth, borderWidth2, borderWidth3, borderWidth4, borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth , thin, thick , borderStyle, borderStyle2, borderStyle3, borderStyle4, borderTopStyle, borderRightStyle, borderBottomStyle, borderLeftStyle @@ -287,6 +289,13 @@ All CSS properties can have the values `unset`, `initial`, and `inherit` @docs borderLeft, borderLeft2, borderLeft3 +## Logical Borders + +@docs borderBlock, borderBlock2, borderBlock3 + +@docs borderInline, borderInline2, borderInline3 + + ## Border Width @docs borderWidth, borderWidth2, borderWidth3, borderWidth4, borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth @@ -7400,6 +7409,95 @@ borderLeft3 (Value widthVal) (Value style) (Value colorVal) = AppendProperty ("border-left:" ++ widthVal ++ " " ++ style ++ " " ++ colorVal) + +{-| Sets [`border-block`](https://css-tricks.com/almanac/properties/b/border-block/) property. + + borderBlock (px 1) + + borderBlock2 (px 1) solid + + borderBlock3 (px 1) solid (hex "#f00") + +-} +borderBlock : BaseValue LineWidth -> Style +borderBlock (Value widthVal) = + AppendProperty ("border-block:" ++ widthVal) + + +{-| Sets [`border-block`](https://css-tricks.com/almanac/properties/b/border-block/) property. + + borderBlock (px 1) + + borderBlock2 (px 1) solid + + borderBlock3 (px 1) solid (hex "#f00") + +-} +borderBlock2 : Value LineWidth -> Value LineStyle -> Style +borderBlock2 (Value widthVal) (Value style) = + AppendProperty ("border-block:" ++ widthVal ++ " " ++ style) + + +{-| Sets [`border-block`](https://css-tricks.com/almanac/properties/b/border-block/) property. + + borderBlock (px 1) + + borderBlock2 (px 1) solid + + borderBlock3 (px 1) solid (hex "#f00") + +-} +borderBlock3 : Value LineWidth -> Value LineStyle -> Value Color -> Style +borderBlock3 (Value widthVal) (Value style) (Value colorVal) = + AppendProperty ("border-block:" ++ widthVal ++ " " ++ style ++ " " ++ colorVal) + + +{-| Sets [`border-inline`](https://css-tricks.com/almanac/properties/b/border-inline/) property. + + borderInline (px 1) + + borderInline2 (px 1) solid + + borderInline3 (px 1) solid (hex "#f00") + +-} +borderInline : BaseValue LineWidth -> Style +borderInline (Value widthVal) = + AppendProperty ("border-inline:" ++ widthVal) + + +{-| Sets [`border-inline`](https://css-tricks.com/almanac/properties/b/border-inline/) property. + + borderInline (px 1) + + borderInline2 (px 1) solid + + borderInline3 (px 1) solid (hex "#f00") + +-} +borderInline2 : Value LineWidth -> Value LineStyle -> Style +borderInline2 (Value widthVal) (Value style) = + AppendProperty ("border-inline:" ++ widthVal ++ " " ++ style) + + +{-| Sets [`border-inline`](https://css-tricks.com/almanac/properties/b/border-inline/) property. + + borderInline (px 1) + + borderInline2 (px 1) solid + + borderInline3 (px 1) solid (hex "#f00") + +-} +borderInline3 : Value LineWidth -> Value LineStyle -> Value Color -> Style +borderInline3 (Value widthVal) (Value style) (Value colorVal) = + AppendProperty ("border-inline:" ++ widthVal ++ " " ++ style ++ " " ++ colorVal) + + + + + + {-| Sets [`border-width`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-width) property. borderWidth (px 1) From 39210f7e42c3a5d9c0483121ab61c1b19289af12 Mon Sep 17 00:00:00 2001 From: Dzuk <32108484+dzuk-mutant@users.noreply.github.com> Date: Tue, 16 Nov 2021 23:34:38 +0000 Subject: [PATCH 2/8] Adds border-block-color and border-inline-color --- src/Css.elm | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/Css.elm b/src/Css.elm index 5eaf820a..e877d463 100644 --- a/src/Css.elm +++ b/src/Css.elm @@ -36,7 +36,7 @@ module Css exposing , thin, thick , borderStyle, borderStyle2, borderStyle3, borderStyle4, borderTopStyle, borderRightStyle, borderBottomStyle, borderLeftStyle , dotted, dashed, solid, double, groove, ridge, inset, outset - , borderColor, borderColor2, borderColor3, borderColor4, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor + , borderColor, borderColor2, borderColor3, borderColor4, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderBlockColor, borderInlineColor , borderRadius, borderRadius2, borderRadius3, borderRadius4, borderTopLeftRadius, borderTopLeftRadius2, borderTopRightRadius, borderTopRightRadius2, borderBottomRightRadius, borderBottomRightRadius2, borderBottomLeftRadius, borderBottomLeftRadius2 , borderImageOutset, borderImageOutset2, borderImageOutset3, borderImageOutset4 , borderImageWidth, borderImageWidth2, borderImageWidth3, borderImageWidth4 @@ -314,6 +314,8 @@ All CSS properties can have the values `unset`, `initial`, and `inherit` @docs borderColor, borderColor2, borderColor3, borderColor4, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor +@docs borderBlockColor, borderInlineColor + ## Border Radius @@ -7792,6 +7794,25 @@ borderLeftColor (Value colorVal) = AppendProperty ("border-left-color:" ++ colorVal) +{-| Sets [`border-block-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-block-color) property. + + borderBlockColor (rgb 0 0 0) + +-} +borderBlockColor : BaseValue Color -> Style +borderBlockColor (Value colorVal) = + AppendProperty ("border-block-color:" ++ colorVal) + + +{-| Sets [`border-inline-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-inline-color) property. + + borderInlineColor (rgb 0 0 0) + +-} +borderInlineColor : BaseValue Color -> Style +borderInlineColor (Value colorVal) = + AppendProperty ("border-inline-color:" ++ colorVal) + -- BORDER WIDTH -- From d7b072b7f8023038c17934daa65ae78ddd383be6 Mon Sep 17 00:00:00 2001 From: Dzuk <32108484+dzuk-mutant@users.noreply.github.com> Date: Tue, 16 Nov 2021 23:43:07 +0000 Subject: [PATCH 3/8] Adds start/end logical border colors Adds implementations for the following: - border-block-start-color - border-block-end-color - border-inline-start-color - border-inline-end-color --- src/Css.elm | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/src/Css.elm b/src/Css.elm index e877d463..079f6eda 100644 --- a/src/Css.elm +++ b/src/Css.elm @@ -36,7 +36,7 @@ module Css exposing , thin, thick , borderStyle, borderStyle2, borderStyle3, borderStyle4, borderTopStyle, borderRightStyle, borderBottomStyle, borderLeftStyle , dotted, dashed, solid, double, groove, ridge, inset, outset - , borderColor, borderColor2, borderColor3, borderColor4, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderBlockColor, borderInlineColor + , borderColor, borderColor2, borderColor3, borderColor4, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderBlockColor, borderBlockStartColor, borderBlockEndColor, borderInlineColor, borderInlineStartColor, borderInlineEndColor , borderRadius, borderRadius2, borderRadius3, borderRadius4, borderTopLeftRadius, borderTopLeftRadius2, borderTopRightRadius, borderTopRightRadius2, borderBottomRightRadius, borderBottomRightRadius2, borderBottomLeftRadius, borderBottomLeftRadius2 , borderImageOutset, borderImageOutset2, borderImageOutset3, borderImageOutset4 , borderImageWidth, borderImageWidth2, borderImageWidth3, borderImageWidth4 @@ -314,7 +314,7 @@ All CSS properties can have the values `unset`, `initial`, and `inherit` @docs borderColor, borderColor2, borderColor3, borderColor4, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor -@docs borderBlockColor, borderInlineColor +@docs borderBlockColor, borderBlockStartColor, borderBlockEndColor, borderInlineColor, borderInlineStartColor, borderInlineEndColor ## Border Radius @@ -7804,6 +7804,26 @@ borderBlockColor (Value colorVal) = AppendProperty ("border-block-color:" ++ colorVal) +{-| Sets [`border-block-start-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-block-start-color) property. + + borderBlockStartColor (rgb 0 0 0) + +-} +borderBlockStartColor : BaseValue Color -> Style +borderBlockStartColor (Value colorVal) = + AppendProperty ("border-block-start-color:" ++ colorVal) + + +{-| Sets [`border-block-end-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-block-end-color) property. + + borderBlockEndColor (rgb 0 0 0) + +-} +borderBlockEndColor : BaseValue Color -> Style +borderBlockEndColor (Value colorVal) = + AppendProperty ("border-block-end-color:" ++ colorVal) + + {-| Sets [`border-inline-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-inline-color) property. borderInlineColor (rgb 0 0 0) @@ -7814,6 +7834,26 @@ borderInlineColor (Value colorVal) = AppendProperty ("border-inline-color:" ++ colorVal) +{-| Sets [`border-inline-start-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-inline-start-color) property. + + borderInlineStartColor (rgb 0 0 0) + +-} +borderInlineStartColor : BaseValue Color -> Style +borderInlineStartColor (Value colorVal) = + AppendProperty ("border-inline-start-color:" ++ colorVal) + + +{-| Sets [`border-inline-end-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-inline-end-color) property. + + borderInlineEndColor (rgb 0 0 0) + +-} +borderInlineEndColor : BaseValue Color -> Style +borderInlineEndColor (Value colorVal) = + AppendProperty ("border-inline-end-color:" ++ colorVal) + + -- BORDER WIDTH -- From 23cdacb2d83d5279bb8a335ddd1c459ce8eed322 Mon Sep 17 00:00:00 2001 From: Dzuk <32108484+dzuk-mutant@users.noreply.github.com> Date: Tue, 16 Nov 2021 23:52:13 +0000 Subject: [PATCH 4/8] Adds block/inline border styles Adds implementations for the following: - border-block-style - border-inline-style Also applies elm-format for this commit and the previous commits. --- src/Css.elm | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/src/Css.elm b/src/Css.elm index 079f6eda..cc6309fd 100644 --- a/src/Css.elm +++ b/src/Css.elm @@ -35,8 +35,10 @@ module Css exposing , borderWidth, borderWidth2, borderWidth3, borderWidth4, borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth , thin, thick , borderStyle, borderStyle2, borderStyle3, borderStyle4, borderTopStyle, borderRightStyle, borderBottomStyle, borderLeftStyle + , borderBlockStyle, borderInlineStyle , dotted, dashed, solid, double, groove, ridge, inset, outset - , borderColor, borderColor2, borderColor3, borderColor4, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderBlockColor, borderBlockStartColor, borderBlockEndColor, borderInlineColor, borderInlineStartColor, borderInlineEndColor + , borderColor, borderColor2, borderColor3, borderColor4, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor + , borderBlockColor, borderBlockStartColor, borderBlockEndColor, borderInlineColor, borderInlineStartColor, borderInlineEndColor , borderRadius, borderRadius2, borderRadius3, borderRadius4, borderTopLeftRadius, borderTopLeftRadius2, borderTopRightRadius, borderTopRightRadius2, borderBottomRightRadius, borderBottomRightRadius2, borderBottomLeftRadius, borderBottomLeftRadius2 , borderImageOutset, borderImageOutset2, borderImageOutset3, borderImageOutset4 , borderImageWidth, borderImageWidth2, borderImageWidth3, borderImageWidth4 @@ -307,6 +309,8 @@ All CSS properties can have the values `unset`, `initial`, and `inherit` @docs borderStyle, borderStyle2, borderStyle3, borderStyle4, borderTopStyle, borderRightStyle, borderBottomStyle, borderLeftStyle +@docs borderBlockStyle, borderInlineStyle + @docs dotted, dashed, solid, double, groove, ridge, inset, outset @@ -7411,7 +7415,6 @@ borderLeft3 (Value widthVal) (Value style) (Value colorVal) = AppendProperty ("border-left:" ++ widthVal ++ " " ++ style ++ " " ++ colorVal) - {-| Sets [`border-block`](https://css-tricks.com/almanac/properties/b/border-block/) property. borderBlock (px 1) @@ -7496,10 +7499,6 @@ borderInline3 (Value widthVal) (Value style) (Value colorVal) = AppendProperty ("border-inline:" ++ widthVal ++ " " ++ style ++ " " ++ colorVal) - - - - {-| Sets [`border-width`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-width) property. borderWidth (px 1) @@ -7690,6 +7689,26 @@ borderLeftStyle (Value style) = AppendProperty ("border-left-style:" ++ style) +{-| Sets [`border-block-style`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-block-style) property. + + borderBlockStyle solid + +-} +borderBlockStyle : BaseValue LineStyle -> Style +borderBlockStyle (Value style) = + AppendProperty ("border-block-style:" ++ style) + + +{-| Sets [`border-inline-style`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-inline-style) property. + + borderInlineStyle solid + +-} +borderInlineStyle : BaseValue LineStyle -> Style +borderInlineStyle (Value style) = + AppendProperty ("border-inline-style:" ++ style) + + {-| Sets [`border-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-color) property. borderColor (rgb 0 0 0) @@ -7854,6 +7873,7 @@ borderInlineEndColor (Value colorVal) = AppendProperty ("border-inline-end-color:" ++ colorVal) + -- BORDER WIDTH -- From 9da1784c1f1d7cd497662586f413a658b5bd57f2 Mon Sep 17 00:00:00 2001 From: Dzuk <32108484+dzuk-mutant@users.noreply.github.com> Date: Tue, 16 Nov 2021 23:59:43 +0000 Subject: [PATCH 5/8] Adds start/end border-styles Implements the following: - border-block-start-style - border-block-end-style - border-inline-start-style - border-inline-end-style --- src/Css.elm | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/src/Css.elm b/src/Css.elm index cc6309fd..ce11e582 100644 --- a/src/Css.elm +++ b/src/Css.elm @@ -35,7 +35,7 @@ module Css exposing , borderWidth, borderWidth2, borderWidth3, borderWidth4, borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth , thin, thick , borderStyle, borderStyle2, borderStyle3, borderStyle4, borderTopStyle, borderRightStyle, borderBottomStyle, borderLeftStyle - , borderBlockStyle, borderInlineStyle + , borderBlockStyle, borderBlockStartStyle, borderBlockEndStyle, borderInlineStyle, borderInlineStartStyle, borderInlineEndStyle , dotted, dashed, solid, double, groove, ridge, inset, outset , borderColor, borderColor2, borderColor3, borderColor4, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor , borderBlockColor, borderBlockStartColor, borderBlockEndColor, borderInlineColor, borderInlineStartColor, borderInlineEndColor @@ -309,7 +309,7 @@ All CSS properties can have the values `unset`, `initial`, and `inherit` @docs borderStyle, borderStyle2, borderStyle3, borderStyle4, borderTopStyle, borderRightStyle, borderBottomStyle, borderLeftStyle -@docs borderBlockStyle, borderInlineStyle +@docs borderBlockStyle, borderBlockStartStyle, borderBlockEndStyle, borderInlineStyle, borderInlineStartStyle, borderInlineEndStyle @docs dotted, dashed, solid, double, groove, ridge, inset, outset @@ -7699,6 +7699,26 @@ borderBlockStyle (Value style) = AppendProperty ("border-block-style:" ++ style) +{-| Sets [`border-block-start-style`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-block-start-style) property. + + borderBlockStartStyle solid + +-} +borderBlockStartStyle : BaseValue LineStyle -> Style +borderBlockStartStyle (Value style) = + AppendProperty ("border-block-start-style:" ++ style) + + +{-| Sets [`border-block-end-style`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-block-end-style) property. + + borderBlockEndStyle solid + +-} +borderBlockEndStyle : BaseValue LineStyle -> Style +borderBlockEndStyle (Value style) = + AppendProperty ("border-block-end-style:" ++ style) + + {-| Sets [`border-inline-style`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-inline-style) property. borderInlineStyle solid @@ -7709,6 +7729,26 @@ borderInlineStyle (Value style) = AppendProperty ("border-inline-style:" ++ style) +{-| Sets [`border-inline-start-style`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-inline-start-style) property. + + borderInlineStartStyle solid + +-} +borderInlineStartStyle : BaseValue LineStyle -> Style +borderInlineStartStyle (Value style) = + AppendProperty ("border-inline-start-style:" ++ style) + + +{-| Sets [`border-inline-end-style`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-inline-end-style) property. + + borderInlineEndStyle solid + +-} +borderInlineEndStyle : BaseValue LineStyle -> Style +borderInlineEndStyle (Value style) = + AppendProperty ("border-inline-end-style:" ++ style) + + {-| Sets [`border-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-color) property. borderColor (rgb 0 0 0) From b12233f869a5241e7be4cdb1a0759b18a1d3dbb7 Mon Sep 17 00:00:00 2001 From: Dzuk <32108484+dzuk-mutant@users.noreply.github.com> Date: Wed, 17 Nov 2021 00:06:28 +0000 Subject: [PATCH 6/8] Adds block/inline border-widths Implements the following: - border-block-width - border-inline-width --- src/Css.elm | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/Css.elm b/src/Css.elm index ce11e582..5f242600 100644 --- a/src/Css.elm +++ b/src/Css.elm @@ -33,6 +33,7 @@ module Css exposing , borderBlock, borderBlock2, borderBlock3 , borderInline, borderInline2, borderInline3 , borderWidth, borderWidth2, borderWidth3, borderWidth4, borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth + , borderBlockWidth, borderInlineWidth , thin, thick , borderStyle, borderStyle2, borderStyle3, borderStyle4, borderTopStyle, borderRightStyle, borderBottomStyle, borderLeftStyle , borderBlockStyle, borderBlockStartStyle, borderBlockEndStyle, borderInlineStyle, borderInlineStartStyle, borderInlineEndStyle @@ -290,9 +291,6 @@ All CSS properties can have the values `unset`, `initial`, and `inherit` @docs borderLeft, borderLeft2, borderLeft3 - -## Logical Borders - @docs borderBlock, borderBlock2, borderBlock3 @docs borderInline, borderInline2, borderInline3 @@ -302,6 +300,8 @@ All CSS properties can have the values `unset`, `initial`, and `inherit` @docs borderWidth, borderWidth2, borderWidth3, borderWidth4, borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth +@docs borderBlockWidth, borderInlineWidth + @docs thin, thick @@ -7603,6 +7603,26 @@ borderLeftWidth (Value widthVal) = AppendProperty ("border-left-width:" ++ widthVal) +{-| Sets [`border-block-width`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-block-width) property. + + borderBlockWidth (px 1) + +-} +borderBlockWidth : BaseValue LineWidth -> Style +borderBlockWidth (Value widthVal) = + AppendProperty ("border-block-width:" ++ widthVal) + + +{-| Sets [`border-inline-width`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-inline-width) property. + + borderTopWidth (px 1) + +-} +borderInlineWidth : BaseValue LineWidth -> Style +borderInlineWidth (Value widthVal) = + AppendProperty ("border-inline-width:" ++ widthVal) + + {-| Sets [`border-style`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-style) property. borderStyle solid From b19b35d6773a35de97f91c83ef1bb199831764cb Mon Sep 17 00:00:00 2001 From: Dzuk <32108484+dzuk-mutant@users.noreply.github.com> Date: Wed, 17 Nov 2021 00:16:09 +0000 Subject: [PATCH 7/8] Adds start/end border-widths Implements the following: - border-block-start-width - border-block-end-width - border-inline-start-width - border-inline-end-width --- src/Css.elm | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/src/Css.elm b/src/Css.elm index 5f242600..b38c089b 100644 --- a/src/Css.elm +++ b/src/Css.elm @@ -33,7 +33,7 @@ module Css exposing , borderBlock, borderBlock2, borderBlock3 , borderInline, borderInline2, borderInline3 , borderWidth, borderWidth2, borderWidth3, borderWidth4, borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth - , borderBlockWidth, borderInlineWidth + , borderBlockWidth, borderBlockStartWidth, borderBlockEndWidth, borderInlineWidth, borderInlineStartWidth, borderInlineEndWidth , thin, thick , borderStyle, borderStyle2, borderStyle3, borderStyle4, borderTopStyle, borderRightStyle, borderBottomStyle, borderLeftStyle , borderBlockStyle, borderBlockStartStyle, borderBlockEndStyle, borderInlineStyle, borderInlineStartStyle, borderInlineEndStyle @@ -300,7 +300,7 @@ All CSS properties can have the values `unset`, `initial`, and `inherit` @docs borderWidth, borderWidth2, borderWidth3, borderWidth4, borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth -@docs borderBlockWidth, borderInlineWidth +@docs borderBlockWidth, borderBlockStartWidth, borderBlockEndWidth, borderInlineWidth, borderInlineStartWidth, borderInlineEndWidth @docs thin, thick @@ -7613,6 +7613,26 @@ borderBlockWidth (Value widthVal) = AppendProperty ("border-block-width:" ++ widthVal) +{-| Sets [`border-block-start-width`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-block-start-width) property. + + borderBlockStartWidth (px 1) + +-} +borderBlockStartWidth : BaseValue LineWidth -> Style +borderBlockStartWidth (Value widthVal) = + AppendProperty ("border-block-start-width:" ++ widthVal) + + +{-| Sets [`border-block-end-width`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-block-end-width) property. + + borderBlockEndWidth (px 1) + +-} +borderBlockEndWidth : BaseValue LineWidth -> Style +borderBlockEndWidth (Value widthVal) = + AppendProperty ("border-block-end-width:" ++ widthVal) + + {-| Sets [`border-inline-width`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-inline-width) property. borderTopWidth (px 1) @@ -7623,6 +7643,26 @@ borderInlineWidth (Value widthVal) = AppendProperty ("border-inline-width:" ++ widthVal) +{-| Sets [`border-inline-start-width`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-inline-start-width) property. + + borderInlineStartWidth (px 1) + +-} +borderInlineStartWidth : BaseValue LineWidth -> Style +borderInlineStartWidth (Value widthVal) = + AppendProperty ("border-inline-start-width:" ++ widthVal) + + +{-| Sets [`border-inline-end-width`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-inline-end-width) property. + + borderInlineEndWidth (px 1) + +-} +borderInlineEndWidth : BaseValue LineWidth -> Style +borderInlineEndWidth (Value widthVal) = + AppendProperty ("border-inline-end-width:" ++ widthVal) + + {-| Sets [`border-style`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-style) property. borderStyle solid From 295058a3a5c472dca60e96ac024f1889d4795f45 Mon Sep 17 00:00:00 2001 From: Dzuk <32108484+dzuk-mutant@users.noreply.github.com> Date: Wed, 17 Nov 2021 01:21:34 +0000 Subject: [PATCH 8/8] Adds one-liner start/end logical borders Implements the following: - border-block-start - border-block-end - border-inline-start - border-inline-end All in 1, 2 and 3-argument variants. --- src/Css.elm | 180 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) diff --git a/src/Css.elm b/src/Css.elm index b38c089b..fd141223 100644 --- a/src/Css.elm +++ b/src/Css.elm @@ -31,7 +31,11 @@ module Css exposing , borderBottom, borderBottom2, borderBottom3 , borderLeft, borderLeft2, borderLeft3 , borderBlock, borderBlock2, borderBlock3 + , borderBlockStart, borderBlockStart2, borderBlockStart3 + , borderBlockEnd, borderBlockEnd2, borderBlockEnd3 , borderInline, borderInline2, borderInline3 + , borderInlineStart, borderInlineStart2, borderInlineStart3 + , borderInlineEnd, borderInlineEnd2, borderInlineEnd3 , borderWidth, borderWidth2, borderWidth3, borderWidth4, borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth , borderBlockWidth, borderBlockStartWidth, borderBlockEndWidth, borderInlineWidth, borderInlineStartWidth, borderInlineEndWidth , thin, thick @@ -293,8 +297,16 @@ All CSS properties can have the values `unset`, `initial`, and `inherit` @docs borderBlock, borderBlock2, borderBlock3 +@docs borderBlockStart, borderBlockStart2, borderBlockStart3 + +@docs borderBlockEnd, borderBlockEnd2, borderBlockEnd3 + @docs borderInline, borderInline2, borderInline3 +@docs borderInlineStart, borderInlineStart2, borderInlineStart3 + +@docs borderInlineEnd, borderInlineEnd2, borderInlineEnd3 + ## Border Width @@ -7457,6 +7469,90 @@ borderBlock3 (Value widthVal) (Value style) (Value colorVal) = AppendProperty ("border-block:" ++ widthVal ++ " " ++ style ++ " " ++ colorVal) +{-| Sets [`border-block-start`](https://css-tricks.com/almanac/properties/b/border-block-start/) property. + + borderBlockStart (px 1) + + borderBlockStart2 (px 1) solid + + borderBlockStart3 (px 1) solid (hex "#f00") + +-} +borderBlockStart : BaseValue LineWidth -> Style +borderBlockStart (Value widthVal) = + AppendProperty ("border-block-start:" ++ widthVal) + + +{-| Sets [`border-block-start`](https://css-tricks.com/almanac/properties/b/border-block-start/) property. + + borderBlockStart (px 1) + + borderBlockStart2 (px 1) solid + + borderBlockStart3 (px 1) solid (hex "#f00") + +-} +borderBlockStart2 : Value LineWidth -> Value LineStyle -> Style +borderBlockStart2 (Value widthVal) (Value style) = + AppendProperty ("border-block-start:" ++ widthVal ++ " " ++ style) + + +{-| Sets [`border-block-start`](https://css-tricks.com/almanac/properties/b/border-block-start/) property. + + borderBlockStart (px 1) + + borderBlockStart2 (px 1) solid + + borderBlockStart3 (px 1) solid (hex "#f00") + +-} +borderBlockStart3 : Value LineWidth -> Value LineStyle -> Value Color -> Style +borderBlockStart3 (Value widthVal) (Value style) (Value colorVal) = + AppendProperty ("border-block-start:" ++ widthVal ++ " " ++ style ++ " " ++ colorVal) + + +{-| Sets [`border-block-end`](https://css-tricks.com/almanac/properties/b/border-block-end/) property. + + borderBlockEnd (px 1) + + borderBlockEnd2 (px 1) solid + + borderBlockEnd3 (px 1) solid (hex "#f00") + +-} +borderBlockEnd : BaseValue LineWidth -> Style +borderBlockEnd (Value widthVal) = + AppendProperty ("border-block-end:" ++ widthVal) + + +{-| Sets [`border-block-end`](https://css-tricks.com/almanac/properties/b/border-block-end/) property. + + borderBlockEnd (px 1) + + borderBlockEnd2 (px 1) solid + + borderBlockEnd3 (px 1) solid (hex "#f00") + +-} +borderBlockEnd2 : Value LineWidth -> Value LineStyle -> Style +borderBlockEnd2 (Value widthVal) (Value style) = + AppendProperty ("border-block-end:" ++ widthVal ++ " " ++ style) + + +{-| Sets [`border-block-end`](https://css-tricks.com/almanac/properties/b/border-block-end/) property. + + borderBlockEnd (px 1) + + borderBlockEnd2 (px 1) solid + + borderBlockEnd3 (px 1) solid (hex "#f00") + +-} +borderBlockEnd3 : Value LineWidth -> Value LineStyle -> Value Color -> Style +borderBlockEnd3 (Value widthVal) (Value style) (Value colorVal) = + AppendProperty ("border-block-end:" ++ widthVal ++ " " ++ style ++ " " ++ colorVal) + + {-| Sets [`border-inline`](https://css-tricks.com/almanac/properties/b/border-inline/) property. borderInline (px 1) @@ -7499,6 +7595,90 @@ borderInline3 (Value widthVal) (Value style) (Value colorVal) = AppendProperty ("border-inline:" ++ widthVal ++ " " ++ style ++ " " ++ colorVal) +{-| Sets [`border-inline-start`](https://css-tricks.com/almanac/properties/b/border-inline-start/) property. + + borderInlineStart (px 1) + + borderInlineStart2 (px 1) solid + + borderInlineStart3 (px 1) solid (hex "#f00") + +-} +borderInlineStart : BaseValue LineWidth -> Style +borderInlineStart (Value widthVal) = + AppendProperty ("border-inline-start:" ++ widthVal) + + +{-| Sets [`border-inline-start`](https://css-tricks.com/almanac/properties/b/border-inline-start/) property. + + borderInlineStart (px 1) + + borderInlineStart2 (px 1) solid + + borderInlineStart3 (px 1) solid (hex "#f00") + +-} +borderInlineStart2 : Value LineWidth -> Value LineStyle -> Style +borderInlineStart2 (Value widthVal) (Value style) = + AppendProperty ("border-inline-start:" ++ widthVal ++ " " ++ style) + + +{-| Sets [`border-inline-start`](https://css-tricks.com/almanac/properties/b/border-inline-start/) property. + + borderInlineStart (px 1) + + borderInlineStart2 (px 1) solid + + borderInlineStart3 (px 1) solid (hex "#f00") + +-} +borderInlineStart3 : Value LineWidth -> Value LineStyle -> Value Color -> Style +borderInlineStart3 (Value widthVal) (Value style) (Value colorVal) = + AppendProperty ("border-inline-start:" ++ widthVal ++ " " ++ style ++ " " ++ colorVal) + + +{-| Sets [`border-inline-end`](https://css-tricks.com/almanac/properties/b/border-inline-end/) property. + + borderInlineEnd (px 1) + + borderInlineEnd2 (px 1) solid + + borderInlineEnd3 (px 1) solid (hex "#f00") + +-} +borderInlineEnd : BaseValue LineWidth -> Style +borderInlineEnd (Value widthVal) = + AppendProperty ("border-inline-end:" ++ widthVal) + + +{-| Sets [`border-inline-end`](https://css-tricks.com/almanac/properties/b/border-inline-end/) property. + + borderInlineEnd (px 1) + + borderInlineEnd2 (px 1) solid + + borderInlineEnd3 (px 1) solid (hex "#f00") + +-} +borderInlineEnd2 : Value LineWidth -> Value LineStyle -> Style +borderInlineEnd2 (Value widthVal) (Value style) = + AppendProperty ("border-inline-end:" ++ widthVal ++ " " ++ style) + + +{-| Sets [`border-inline-end`](https://css-tricks.com/almanac/properties/b/border-inline-end/) property. + + borderInlineEnd (px 1) + + borderInlineEnd2 (px 1) solid + + borderInlineEnd3 (px 1) solid (hex "#f00") + +-} +borderInlineEnd3 : Value LineWidth -> Value LineStyle -> Value Color -> Style +borderInlineEnd3 (Value widthVal) (Value style) (Value colorVal) = + AppendProperty ("border-inline-end:" ++ widthVal ++ " " ++ style ++ " " ++ colorVal) + + {-| Sets [`border-width`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-width) property. borderWidth (px 1)