Skip to content

Commit

Permalink
fix border, border-<left, right, top, bottom>
Browse files Browse the repository at this point in the history
  • Loading branch information
lubegasimon committed Apr 2, 2024
1 parent 9b3bbc4 commit dd0c61f
Show file tree
Hide file tree
Showing 8 changed files with 396 additions and 212 deletions.
91 changes: 51 additions & 40 deletions packages/css/js/Css_Js_Core.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1897,58 +1897,69 @@ let string_of_borderstyle x =
| #Var.t as va -> Var.toString va
| #Cascading.t as c -> Cascading.toString c

let border px style color =
D
( {js|border|js},
LineWidth.toString px
^ {js| |js}
^ string_of_borderstyle style
^ {js| |js}
^ string_of_color color )
let string_of_width_style width style =
LineWidth.toString width ^ {js| |js} ^ string_of_borderstyle style

let string_of_width_style_color width style color =
LineWidth.toString width
^ {js| |js}
^ string_of_borderstyle style
^ {js| |js}
^ string_of_color color

let string_of_none = function `none -> {js|none|js}
let borderNone x = D ({js|border|js}, string_of_none x)
let borderWidthOnly width = D ({js|border|js}, LineWidth.toString width)

let borderWidthStyle width style =
D ({js|border|js}, string_of_width_style width style)

let borderAll width style color =
D ({js|border|js}, string_of_width_style_color width style color)

let borderStyle x = D ({js|borderStyle|js}, string_of_borderstyle x)
let borderLeftNone x = D ({js|borderLeft|js}, string_of_none x)
let borderLeftWidthOnly width = D ({js|borderLeft|js}, LineWidth.toString width)

let borderLeft px style color =
D
( {js|borderLeft|js},
LineWidth.toString px
^ {js| |js}
^ string_of_borderstyle style
^ {js| |js}
^ string_of_color color )
let borderLeftWidthStyle width style =
D ({js|borderLeft|js}, string_of_width_style width style)

let borderLeftAll width style color =
D ({js|borderLeft|js}, string_of_width_style_color width style color)

let borderLeftStyle x = D ({js|borderLeftStyle|js}, string_of_borderstyle x)
let borderRightNone x = D ({js|borderRight|js}, string_of_none x)

let borderRight px style color =
D
( {js|borderRight|js},
LineWidth.toString px
^ {js| |js}
^ string_of_borderstyle style
^ {js| |js}
^ string_of_color color )
let borderRigthWidthOnly width =
D ({js|borderRight|js}, LineWidth.toString width)

let borderRightWidthStyle width style =
D ({js|borderRight|js}, string_of_width_style width style)

let borderRightAll width style color =
D ({js|borderRight|js}, string_of_width_style_color width style color)

let borderRightStyle x = D ({js|borderRightStyle|js}, string_of_borderstyle x)
let borderTopNone x = D ({js|borderTop|js}, string_of_none x)
let borderTopWidthOnly width = D ({js|borderTop|js}, LineWidth.toString width)

let borderTop px style color =
D
( {js|borderTop|js},
LineWidth.toString px
^ {js| |js}
^ string_of_borderstyle style
^ {js| |js}
^ string_of_color color )
let borderTopWidthStyle width style =
D ({js|borderTop|js}, string_of_width_style width style)

let borderTopAll width style color =
D ({js|borderTop|js}, string_of_width_style_color width style color)

let borderTopStyle x = D ({js|borderTopStyle|js}, string_of_borderstyle x)
let borderBottomNone x = D ({js|borderBottom|js}, string_of_none x)

let borderBottom px style color =
D
( {js|borderBottom|js},
LineWidth.toString px
^ {js| |js}
^ string_of_borderstyle style
^ {js| |js}
^ string_of_color color )
let borderBottomWidthOnly width =
D ({js|borderBottom|js}, LineWidth.toString width)

let borderBottomWidthStyle width style =
D ({js|borderBottom|js}, string_of_width_style width style)

let borderBottomAll width style color =
D ({js|borderBottom|js}, string_of_width_style_color width style color)

let borderBottomStyle x = D ({js|borderBottomStyle|js}, string_of_borderstyle x)

Expand Down
93 changes: 52 additions & 41 deletions packages/css/js/Css_Legacy_Core.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1726,58 +1726,69 @@ let string_of_borderstyle x =
| #Var.t as va -> Var.toString va
| #Cascading.t as c -> Cascading.toString c

let border px style color =
D
( {js|border|js},
LineWidth.toString px
^ {js| |js}
^ string_of_borderstyle style
^ {js| |js}
^ string_of_color color )
let string_of_width_style width style =
LineWidth.toString width ^ {js| |js} ^ string_of_borderstyle style

let string_of_width_style_color width style color =
LineWidth.toString width
^ {js| |js}
^ string_of_borderstyle style
^ {js| |js}
^ string_of_color color

let string_of_none = function `none -> {js|none|js}
let borderNone x = D ({js|border|js}, string_of_none x)
let borderWidthOnly width = D ({js|border|js}, LineWidth.toString width)

let borderWidthStyle width style =
D ({js|border|js}, string_of_width_style width style)

let borderAll width style color =
D ({js|border|js}, string_of_width_style_color width style color)

let borderStyle x = D ({js|borderStyle|js}, string_of_borderstyle x)
let borderLeftNone x = D ({js|borderLeft|js}, string_of_none x)
let borderLeftWidthOnly width = D ({js|borderLeft|js}, LineWidth.toString width)

let borderLeft px style color =
D
( {js|borderLeft|js},
LineWidth.toString px
^ {js| |js}
^ string_of_borderstyle style
^ {js| |js}
^ string_of_color color )
let borderLeftWidthStyle width style =
D ({js|borderLeft|js}, string_of_width_style width style)

let borderLeftAll width style color =
D ({js|borderLeft|js}, string_of_width_style_color width style color)

let borderLeftStyle x = D ({js|borderLeftStyle|js}, string_of_borderstyle x)
let borderRightNone x = D ({js|borderRight|js}, string_of_none x)

let borderRight px style color =
D
( {js|borderRight|js},
LineWidth.toString px
^ {js| |js}
^ string_of_borderstyle style
^ {js| |js}
^ string_of_color color )
let borderRigthWidthOnly width =
D ({js|borderRight|js}, LineWidth.toString width)

let borderRightWidthStyle width style =
D ({js|borderRight|js}, string_of_width_style width style)

let borderRightAll width style color =
D ({js|borderRight|js}, string_of_width_style_color width style color)

let borderRightStyle x = D ({js|borderRightStyle|js}, string_of_borderstyle x)
let borderTopNone x = D ({js|borderTop|js}, string_of_none x)
let borderTopWidthOnly width = D ({js|borderTop|js}, LineWidth.toString width)

let borderTop px style color =
D
( {js|borderTop|js},
LineWidth.toString px
^ {js| |js}
^ string_of_borderstyle style
^ {js| |js}
^ string_of_color color )
let borderTopWidthStyle width style =
D ({js|borderTop|js}, string_of_width_style width style)

let borderTopStyle x = D ({js| |js}, string_of_borderstyle x)
let borderTopAll width style color =
D ({js|borderTop|js}, string_of_width_style_color width style color)

let borderBottom px style color =
D
( {js|borderBottom|js},
LineWidth.toString px
^ {js| |js}
^ string_of_borderstyle style
^ {js| |js}
^ string_of_color color )
let borderTopStyle x = D ({js|borderTopStyle|js}, string_of_borderstyle x)
let borderBottomNone x = D ({js|borderBottom|js}, string_of_none x)

let borderBottomWidthOnly width =
D ({js|borderBottom|js}, LineWidth.toString width)

let borderBottomWidthStyle width style =
D ({js|borderBottom|js}, string_of_width_style width style)

let borderBottomAll width style color =
D ({js|borderBottom|js}, string_of_width_style_color width style color)

let borderBottomStyle x = D ({js|borderBottomStyle|js}, string_of_borderstyle x)

Expand Down
90 changes: 50 additions & 40 deletions packages/css/native/Css_Js_Core.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1846,58 +1846,68 @@ let string_of_borderstyle x =
| #Var.t as va -> Var.toString va
| #Cascading.t as c -> Cascading.toString c

let border px style color =
D
( {js|border|js},
LineWidth.toString px
^ {js| |js}
^ string_of_borderstyle style
^ {js| |js}
^ string_of_color color )
let string_of_width_style width style =
LineWidth.toString width ^ {js| |js} ^ string_of_borderstyle style

let string_of_width_style_color width style color =
LineWidth.toString width
^ {js| |js}
^ string_of_borderstyle style
^ {js| |js}
^ string_of_color color

let string_of_none = function `none -> {js|none|js}
let borderNone x = D ({js|border|js}, string_of_none x)
let borderWidthOnly width = D ({js|border|js}, LineWidth.toString width)

let borderWidthStyle width style =
D ({js|border|js}, string_of_width_style width style)

let borderAll width style color =
D ({js|border|js}, string_of_width_style_color width style color)

let borderStyle x = D ({js|border-style|js}, string_of_borderstyle x)
let borderLeftNone x = D ({js|border-left|js}, string_of_none x)
let borderLeftWidthOnly width = D ({js|border-left|js}, LineWidth.toString width)

let borderLeft px style color =
D
( {js|border-left|js},
LineWidth.toString px
^ {js| |js}
^ string_of_borderstyle style
^ {js| |js}
^ string_of_color color )
let borderLeftWidthStyle width style =
D ({js|border-left|js}, string_of_width_style width style)

let borderLeftAll width style color =
D ({js|border-left|js}, string_of_width_style_color width style color)

let borderLeftStyle x = D ({js|border-left-style|js}, string_of_borderstyle x)

let borderRight px style color =
D
( {js|border-right|js},
LineWidth.toString px
^ {js| |js}
^ string_of_borderstyle style
^ {js| |js}
^ string_of_color color )
let borderRigthWidthOnly width =
D ({js|border-right|js}, LineWidth.toString width)

let borderRightWidthStyle width style =
D ({js|border-right|js}, string_of_width_style width style)

let borderRightAll width style color =
D ({js|border-right|js}, string_of_width_style_color width style color)

let borderRightStyle x = D ({js|border-right-style|js}, string_of_borderstyle x)
let borderTopNone x = D ({js|border-top|js}, string_of_none x)
let borderTopWidthOnly width = D ({js|border-top|js}, LineWidth.toString width)

let borderTop px style color =
D
( {js|border-top|js},
LineWidth.toString px
^ {js| |js}
^ string_of_borderstyle style
^ {js| |js}
^ string_of_color color )
let borderTopWidthStyle width style =
D ({js|border-top|js}, string_of_width_style width style)

let borderTopAll width style color =
D ({js|border-top|js}, string_of_width_style_color width style color)

let borderTopStyle x = D ({js|border-top-style|js}, string_of_borderstyle x)
let borderBottomNone x = D ({js|border-bottom|js}, string_of_none x)

let borderBottom px style color =
D
( {js|border-bottom|js},
LineWidth.toString px
^ {js| |js}
^ string_of_borderstyle style
^ {js| |js}
^ string_of_color color )
let borderBottomWidthOnly width =
D ({js|border-bottom|js}, LineWidth.toString width)

let borderBottomWidthStyle width style =
D ({js|border-bottom|js}, string_of_width_style width style)

let borderBottomAll width style color =
D ({js|border-bottom|js}, string_of_width_style_color width style color)

let borderBottomStyle x =
D ({js|border-bottom-style|js}, string_of_borderstyle x)
Expand Down
Loading

0 comments on commit dd0c61f

Please sign in to comment.