@@ -16,65 +16,99 @@ gradientBackground =
1616 colour.highlightDarker
1717 ","
1818 colour.highlightLighter
19− "),linear-gradient(225deg,"
19+ ")"
20+ ","
21+ "linear-gradient(225deg,"
2022 colour.highlightRotatedBackwards
2123 ","
2224 colour.highlightRotatedForwards
2325 ")"
2426
25−buttonContainer ∷ Style
26−buttonContainer =
27+backgroundAnimation ∷ StyleProperty
28+backgroundAnimation =
29+ keyframes
30+ $ { "from": css { backgroundPosition: str "0% 50%" }
31+ , "to": css { backgroundPosition: str "100% 50%" }
32+ }
33+
34+button ∷ Style
35+button =
2736 css
2837 { background: str colour.interfaceBackground
2938 , boxShadow: str "0 1px 4px rgba(0,0,0,0.30)"
39+ , border: str $ i "1px solid transparent"
3040 , borderTop: str $ i "1px solid " colour.interfaceBackgroundHighlight
3141 , borderBottom: str $ i "1px solid " colour.interfaceBackgroundShadow
3242 , display: inlineFlex
33− , padding: str "2px"
43+ , padding: str "calc(var(--s-1) * 0.85) var(--s0)"
3444 , justifyContent: center
3545 , alignItems: center
3646 , borderRadius: var "--s-1"
47+ , color: str colour.text
48+ , boxSizing: borderBox
49+ , fontSize: var "--s0"
50+ , fontFamily: var "--mainFont"
51+ , fontWeight: str "450"
52+ , letterSpacing: str "calc(var(--s-5)* (-0.1))"
53+ , userSelect: none
54+ , transition: str "all 0.2s ease-out" <> str "transform 50ms ease-in"
3755 , """&[data-button-shape="pill"]""":
3856 nest
39− { borderRadius: var "--s1"
40− , "& > button":
41− nest
42− { padding: str "calc(var(--s-1) * 0.8) var(--s0)"
43− }
57+ { borderRadius: str "calc(var(--s1) * 0.85)"
58+ , padding: str "calc(var(--s-1) * 0.9) var(--s0)"
4459 }
4560 , """&[data-button-type="primary"]""":
4661 nest
4762 { background: gradientBackground
4863 , backgroundSize: str "200% 200%"
64+ , fontWeight: str "600"
65+ , letterSpacing: str "calc(var(--s-5)* (0.1))"
4966 , animation: backgroundAnimation <> str " alternate ease-out 10s infinite"
5067 , boxShadow: str "0 1px 4px 0px rgba(0,0,0,0.40)"
5168 , borderColor: str "transparent"
52− , "& > button":
69+ , color: str colour.highlightText
70+ , """&:focus-visible""":
5371 nest
54− { color: str colour.highlightText
72+ { borderColor: str $ colour.background0
73+ }
74+ , """&:active""":
75+ nest
76+ { boxShadow: str "inset 0 1px 6px rgba(0,0,0,0.40)"
77+ , border: str $ i "1px solid transparent"
78+ }
79+ , "&:disabled":
80+ nest
81+ { background: str colour.highlightDisabled
5582 }
5683 }
57− }
58−
59−backgroundAnimation ∷ StyleProperty
60−backgroundAnimation =
61− keyframes
62− $ { "from": css { backgroundPosition: str "0% 50%" }
63− , "to": css { backgroundPosition: str "100% 50%" }
64− }
65−
66−button ∷ Style
67−button =
68− css
69− { background: str "transparent"
70− , color: str colour.text
71− , boxSizing: borderBox
72− , fontSize: var "--s0"
73− , fontFamily: var "--mainFont"
74− , fontWeight: str "500"
75− , letterSpacing: str "calc(var(--s-5)*0.2)"
76− , padding: str "calc(var(--s-1) * 0.85) var(--s0)"
77− , border: none
78− , userSelect: none
79− , "&:focus": nest { outline: none }
84+ , """&[data-button-type="dangerous"]""":
85+ nest
86+ { color: str $ colour.interfaceDangerousText
87+ , background: str $ colour.interfaceBackgroundDangerous
88+ , fontWeight: str "600"
89+ , letterSpacing: str "calc(var(--s-5) * -0.10)"
90+ }
91+ , """&:focus""": nest { outline: none }
92+ , """&:focus-visible""":
93+ nest
94+ { boxShadow: str $ "0 0 0 var(--s-4) " <> colour.highlight
95+ }
96+ , """&:active""":
97+ nest
98+ { boxShadow:
99+ str
100+ $ "inset 0 1px var(--s-1) rgba(0,0,0,0.20)"
101+ , borderTop: str $ i "1px solid " colour.interfaceBackgroundShadow
102+ , borderBottom: str $ i "1px solid " colour.interfaceBackgroundShadow
103+ , transform: str "scale3d(0.95,0.95,0.95)"
104+ , transition: str "transform 50ms ease"
105+ }
106+ , "&:disabled":
107+ nest
108+ { color: str colour.interfaceTextDisabled
109+ , boxShadow: none
110+ , background: str colour.interfaceBackgroundDisabled
111+ , borderTop: str $ i "1px solid " colour.interfaceBackgroundShadow
112+ , borderBottom: str $ i "1px solid " colour.interfaceBackgroundShadow
113+ }
80114 }