Skip to content

Commit dd0c61f

Browse files
committed
fix border, border-<left, right, top, bottom>
1 parent 9b3bbc4 commit dd0c61f

File tree

8 files changed

+396
-212
lines changed

8 files changed

+396
-212
lines changed

packages/css/js/Css_Js_Core.ml

Lines changed: 51 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1897,58 +1897,69 @@ let string_of_borderstyle x =
18971897
| #Var.t as va -> Var.toString va
18981898
| #Cascading.t as c -> Cascading.toString c
18991899

1900-
let border px style color =
1901-
D
1902-
( {js|border|js},
1903-
LineWidth.toString px
1904-
^ {js| |js}
1905-
^ string_of_borderstyle style
1906-
^ {js| |js}
1907-
^ string_of_color color )
1900+
let string_of_width_style width style =
1901+
LineWidth.toString width ^ {js| |js} ^ string_of_borderstyle style
1902+
1903+
let string_of_width_style_color width style color =
1904+
LineWidth.toString width
1905+
^ {js| |js}
1906+
^ string_of_borderstyle style
1907+
^ {js| |js}
1908+
^ string_of_color color
1909+
1910+
let string_of_none = function `none -> {js|none|js}
1911+
let borderNone x = D ({js|border|js}, string_of_none x)
1912+
let borderWidthOnly width = D ({js|border|js}, LineWidth.toString width)
1913+
1914+
let borderWidthStyle width style =
1915+
D ({js|border|js}, string_of_width_style width style)
1916+
1917+
let borderAll width style color =
1918+
D ({js|border|js}, string_of_width_style_color width style color)
19081919

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

1911-
let borderLeft px style color =
1912-
D
1913-
( {js|borderLeft|js},
1914-
LineWidth.toString px
1915-
^ {js| |js}
1916-
^ string_of_borderstyle style
1917-
^ {js| |js}
1918-
^ string_of_color color )
1924+
let borderLeftWidthStyle width style =
1925+
D ({js|borderLeft|js}, string_of_width_style width style)
1926+
1927+
let borderLeftAll width style color =
1928+
D ({js|borderLeft|js}, string_of_width_style_color width style color)
19191929

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

1922-
let borderRight px style color =
1923-
D
1924-
( {js|borderRight|js},
1925-
LineWidth.toString px
1926-
^ {js| |js}
1927-
^ string_of_borderstyle style
1928-
^ {js| |js}
1929-
^ string_of_color color )
1933+
let borderRigthWidthOnly width =
1934+
D ({js|borderRight|js}, LineWidth.toString width)
1935+
1936+
let borderRightWidthStyle width style =
1937+
D ({js|borderRight|js}, string_of_width_style width style)
1938+
1939+
let borderRightAll width style color =
1940+
D ({js|borderRight|js}, string_of_width_style_color width style color)
19301941

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

1933-
let borderTop px style color =
1934-
D
1935-
( {js|borderTop|js},
1936-
LineWidth.toString px
1937-
^ {js| |js}
1938-
^ string_of_borderstyle style
1939-
^ {js| |js}
1940-
^ string_of_color color )
1946+
let borderTopWidthStyle width style =
1947+
D ({js|borderTop|js}, string_of_width_style width style)
1948+
1949+
let borderTopAll width style color =
1950+
D ({js|borderTop|js}, string_of_width_style_color width style color)
19411951

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

1944-
let borderBottom px style color =
1945-
D
1946-
( {js|borderBottom|js},
1947-
LineWidth.toString px
1948-
^ {js| |js}
1949-
^ string_of_borderstyle style
1950-
^ {js| |js}
1951-
^ string_of_color color )
1955+
let borderBottomWidthOnly width =
1956+
D ({js|borderBottom|js}, LineWidth.toString width)
1957+
1958+
let borderBottomWidthStyle width style =
1959+
D ({js|borderBottom|js}, string_of_width_style width style)
1960+
1961+
let borderBottomAll width style color =
1962+
D ({js|borderBottom|js}, string_of_width_style_color width style color)
19521963

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

packages/css/js/Css_Legacy_Core.ml

Lines changed: 52 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,58 +1726,69 @@ let string_of_borderstyle x =
17261726
| #Var.t as va -> Var.toString va
17271727
| #Cascading.t as c -> Cascading.toString c
17281728

1729-
let border px style color =
1730-
D
1731-
( {js|border|js},
1732-
LineWidth.toString px
1733-
^ {js| |js}
1734-
^ string_of_borderstyle style
1735-
^ {js| |js}
1736-
^ string_of_color color )
1729+
let string_of_width_style width style =
1730+
LineWidth.toString width ^ {js| |js} ^ string_of_borderstyle style
1731+
1732+
let string_of_width_style_color width style color =
1733+
LineWidth.toString width
1734+
^ {js| |js}
1735+
^ string_of_borderstyle style
1736+
^ {js| |js}
1737+
^ string_of_color color
1738+
1739+
let string_of_none = function `none -> {js|none|js}
1740+
let borderNone x = D ({js|border|js}, string_of_none x)
1741+
let borderWidthOnly width = D ({js|border|js}, LineWidth.toString width)
1742+
1743+
let borderWidthStyle width style =
1744+
D ({js|border|js}, string_of_width_style width style)
1745+
1746+
let borderAll width style color =
1747+
D ({js|border|js}, string_of_width_style_color width style color)
17371748

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

1740-
let borderLeft px style color =
1741-
D
1742-
( {js|borderLeft|js},
1743-
LineWidth.toString px
1744-
^ {js| |js}
1745-
^ string_of_borderstyle style
1746-
^ {js| |js}
1747-
^ string_of_color color )
1753+
let borderLeftWidthStyle width style =
1754+
D ({js|borderLeft|js}, string_of_width_style width style)
1755+
1756+
let borderLeftAll width style color =
1757+
D ({js|borderLeft|js}, string_of_width_style_color width style color)
17481758

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

1751-
let borderRight px style color =
1752-
D
1753-
( {js|borderRight|js},
1754-
LineWidth.toString px
1755-
^ {js| |js}
1756-
^ string_of_borderstyle style
1757-
^ {js| |js}
1758-
^ string_of_color color )
1762+
let borderRigthWidthOnly width =
1763+
D ({js|borderRight|js}, LineWidth.toString width)
1764+
1765+
let borderRightWidthStyle width style =
1766+
D ({js|borderRight|js}, string_of_width_style width style)
1767+
1768+
let borderRightAll width style color =
1769+
D ({js|borderRight|js}, string_of_width_style_color width style color)
17591770

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

1762-
let borderTop px style color =
1763-
D
1764-
( {js|borderTop|js},
1765-
LineWidth.toString px
1766-
^ {js| |js}
1767-
^ string_of_borderstyle style
1768-
^ {js| |js}
1769-
^ string_of_color color )
1775+
let borderTopWidthStyle width style =
1776+
D ({js|borderTop|js}, string_of_width_style width style)
17701777

1771-
let borderTopStyle x = D ({js| |js}, string_of_borderstyle x)
1778+
let borderTopAll width style color =
1779+
D ({js|borderTop|js}, string_of_width_style_color width style color)
17721780

1773-
let borderBottom px style color =
1774-
D
1775-
( {js|borderBottom|js},
1776-
LineWidth.toString px
1777-
^ {js| |js}
1778-
^ string_of_borderstyle style
1779-
^ {js| |js}
1780-
^ string_of_color color )
1781+
let borderTopStyle x = D ({js|borderTopStyle|js}, string_of_borderstyle x)
1782+
let borderBottomNone x = D ({js|borderBottom|js}, string_of_none x)
1783+
1784+
let borderBottomWidthOnly width =
1785+
D ({js|borderBottom|js}, LineWidth.toString width)
1786+
1787+
let borderBottomWidthStyle width style =
1788+
D ({js|borderBottom|js}, string_of_width_style width style)
1789+
1790+
let borderBottomAll width style color =
1791+
D ({js|borderBottom|js}, string_of_width_style_color width style color)
17811792

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

packages/css/native/Css_Js_Core.ml

Lines changed: 50 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,58 +1846,68 @@ let string_of_borderstyle x =
18461846
| #Var.t as va -> Var.toString va
18471847
| #Cascading.t as c -> Cascading.toString c
18481848

1849-
let border px style color =
1850-
D
1851-
( {js|border|js},
1852-
LineWidth.toString px
1853-
^ {js| |js}
1854-
^ string_of_borderstyle style
1855-
^ {js| |js}
1856-
^ string_of_color color )
1849+
let string_of_width_style width style =
1850+
LineWidth.toString width ^ {js| |js} ^ string_of_borderstyle style
1851+
1852+
let string_of_width_style_color width style color =
1853+
LineWidth.toString width
1854+
^ {js| |js}
1855+
^ string_of_borderstyle style
1856+
^ {js| |js}
1857+
^ string_of_color color
1858+
1859+
let string_of_none = function `none -> {js|none|js}
1860+
let borderNone x = D ({js|border|js}, string_of_none x)
1861+
let borderWidthOnly width = D ({js|border|js}, LineWidth.toString width)
1862+
1863+
let borderWidthStyle width style =
1864+
D ({js|border|js}, string_of_width_style width style)
1865+
1866+
let borderAll width style color =
1867+
D ({js|border|js}, string_of_width_style_color width style color)
18571868

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

1860-
let borderLeft px style color =
1861-
D
1862-
( {js|border-left|js},
1863-
LineWidth.toString px
1864-
^ {js| |js}
1865-
^ string_of_borderstyle style
1866-
^ {js| |js}
1867-
^ string_of_color color )
1873+
let borderLeftWidthStyle width style =
1874+
D ({js|border-left|js}, string_of_width_style width style)
1875+
1876+
let borderLeftAll width style color =
1877+
D ({js|border-left|js}, string_of_width_style_color width style color)
18681878

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

1871-
let borderRight px style color =
1872-
D
1873-
( {js|border-right|js},
1874-
LineWidth.toString px
1875-
^ {js| |js}
1876-
^ string_of_borderstyle style
1877-
^ {js| |js}
1878-
^ string_of_color color )
1881+
let borderRigthWidthOnly width =
1882+
D ({js|border-right|js}, LineWidth.toString width)
1883+
1884+
let borderRightWidthStyle width style =
1885+
D ({js|border-right|js}, string_of_width_style width style)
1886+
1887+
let borderRightAll width style color =
1888+
D ({js|border-right|js}, string_of_width_style_color width style color)
18791889

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

1882-
let borderTop px style color =
1883-
D
1884-
( {js|border-top|js},
1885-
LineWidth.toString px
1886-
^ {js| |js}
1887-
^ string_of_borderstyle style
1888-
^ {js| |js}
1889-
^ string_of_color color )
1894+
let borderTopWidthStyle width style =
1895+
D ({js|border-top|js}, string_of_width_style width style)
1896+
1897+
let borderTopAll width style color =
1898+
D ({js|border-top|js}, string_of_width_style_color width style color)
18901899

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

1893-
let borderBottom px style color =
1894-
D
1895-
( {js|border-bottom|js},
1896-
LineWidth.toString px
1897-
^ {js| |js}
1898-
^ string_of_borderstyle style
1899-
^ {js| |js}
1900-
^ string_of_color color )
1903+
let borderBottomWidthOnly width =
1904+
D ({js|border-bottom|js}, LineWidth.toString width)
1905+
1906+
let borderBottomWidthStyle width style =
1907+
D ({js|border-bottom|js}, string_of_width_style width style)
1908+
1909+
let borderBottomAll width style color =
1910+
D ({js|border-bottom|js}, string_of_width_style_color width style color)
19011911

19021912
let borderBottomStyle x =
19031913
D ({js|border-bottom-style|js}, string_of_borderstyle x)

0 commit comments

Comments
 (0)