Skip to content

Commit 1f3f8f6

Browse files
author
Richard Feldman
authored
Merge pull request #466 from rtfeldman/css-animations
Document & expose Css.Animations
2 parents 1d2106b + 5fe1b6d commit 1f3f8f6

File tree

2 files changed

+43
-25
lines changed

2 files changed

+43
-25
lines changed

0.18-src/Css/Animations.elm

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,23 @@
1-
module Css.Animations exposing
2-
( Property, keyframes, Keyframes
3-
, opacity, transform, all, backgroundSize, backgroundSize2, border, property
4-
, backgroundColor
5-
)
1+
module Css.Animations
2+
exposing
3+
( Keyframes
4+
, Property
5+
, all
6+
, backgroundColor
7+
, backgroundSize
8+
, backgroundSize2
9+
, border
10+
, border2
11+
, border3
12+
, borderBottom
13+
, borderBottom2
14+
, borderBottom3
15+
, custom
16+
, keyframes
17+
, opacity
18+
, property
19+
, transform
20+
)
621

722
{-|
823
@@ -20,15 +35,7 @@ Some of the animatable properties (except for experimental properties, or proper
2035
2136
**NOTE:** We're looking to expand this list, but only on the `phantom-types` branch! See <https://github.com/rtfeldman/elm-css/issues/392>
2237
23-
@docs opacity, transform, transformOrigin, translate, all, backgroundSize, backgroundSize2, border, property
24-
25-
border2 : Length compatible units -> Length compatible units -> Property
26-
border2 arg1 arg2 =
27-
Property ("border:" ++ arg1.value ++ " " ++ arg2.value)
28-
29-
border3 : Length compatible units -> Length compatible units -> Length compatible units -> Property
30-
border3 arg1 arg2 arg3 =
31-
Property ("border:" ++ arg1.value ++ " " ++ arg2.value ++ " " ++ arg3.value)
38+
@docs opacity, transform, all, backgroundSize, backgroundSize2, border, property, backgroundColor, border2, border3, borderBottom, borderBottom2, borderBottom3, custom
3239
3340
-}
3441

@@ -99,51 +106,61 @@ custom name value =
99106
Property (name ++ ":" ++ value)
100107

101108

109+
{-| -}
102110
all : { compatible | value : String, all : Compatible } -> Property
103111
all { value } =
104112
Property ("all:" ++ value)
105113

106114

115+
{-| -}
107116
backgroundColor : { compatible | value : String, color : Compatible } -> Property
108117
backgroundColor { value } =
109118
Property ("background-color:" ++ value)
110119

111120

121+
{-| -}
112122
backgroundSize : LengthOrAutoOrCoverOrContain compatible -> Property
113123
backgroundSize { value } =
114124
Property ("background-size:" ++ value)
115125

116126

127+
{-| -}
117128
backgroundSize2 : LengthOrAutoOrCoverOrContain compatible -> LengthOrAutoOrCoverOrContain compatible -> Property
118129
backgroundSize2 arg1 arg2 =
119130
Property ("background-size:" ++ arg1.value ++ " " ++ arg2.value)
120131

121132

133+
{-| -}
122134
border : Length compatible units -> Property
123135
border { value } =
124136
Property ("border:" ++ value)
125137

126138

139+
{-| -}
127140
border2 : Length compatible units -> Length compatible units -> Property
128141
border2 arg1 arg2 =
129142
Property ("border:" ++ arg1.value ++ " " ++ arg2.value)
130143

131144

145+
{-| -}
132146
border3 : Length compatible units -> Length compatible units -> Length compatible units -> Property
133147
border3 arg1 arg2 arg3 =
134148
Property ("border:" ++ arg1.value ++ " " ++ arg2.value ++ " " ++ arg3.value)
135149

136150

151+
{-| -}
137152
borderBottom : Length compatible units -> Property
138153
borderBottom { value } =
139154
Property ("border-bottom:" ++ value)
140155

141156

157+
{-| -}
142158
borderBottom2 : Length compatible units -> Length compatible units -> Property
143159
borderBottom2 arg1 arg2 =
144160
Property ("border-bottom:" ++ arg1.value ++ " " ++ arg2.value)
145161

146162

163+
{-| -}
147164
borderBottom3 : Length compatible units -> Length compatible units -> Length compatible units -> Property
148165
borderBottom3 arg1 arg2 arg3 =
149166
Property ("border-bottom:" ++ arg1.value ++ " " ++ arg2.value ++ " " ++ arg3.value)

src/Css/Animations.elm

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module Css.Animations exposing
22
( Property, keyframes, Keyframes
3-
, opacity, transform, all, backgroundSize, backgroundSize2, border, property
4-
, backgroundColor
3+
, opacity, transform, all, backgroundSize, backgroundSize2, border, property, backgroundColor, border2, border3, borderBottom, borderBottom2, borderBottom3, custom
54
)
65

76
{-|
@@ -20,15 +19,7 @@ Some of the animatable properties (except for experimental properties, or proper
2019
2120
**NOTE:** We're looking to expand this list, but only on the `phantom-types` branch! See <https://github.com/rtfeldman/elm-css/issues/392>
2221
23-
@docs opacity, transform, transformOrigin, translate, all, backgroundSize, backgroundSize2, border, property
24-
25-
border2 : Length compatible units -> Length compatible units -> Property
26-
border2 arg1 arg2 =
27-
Property ("border:" ++ arg1.value ++ " " ++ arg2.value)
28-
29-
border3 : Length compatible units -> Length compatible units -> Length compatible units -> Property
30-
border3 arg1 arg2 arg3 =
31-
Property ("border:" ++ arg1.value ++ " " ++ arg2.value ++ " " ++ arg3.value)
22+
@docs opacity, transform, all, backgroundSize, backgroundSize2, border, property, backgroundColor, border2, border3, borderBottom, borderBottom2, borderBottom3, custom
3223
3324
-}
3425

@@ -100,51 +91,61 @@ custom name value =
10091
Property (name ++ ":" ++ value)
10192

10293

94+
{-| -}
10395
all : { compatible | value : String, all : Compatible } -> Property
10496
all { value } =
10597
Property ("all:" ++ value)
10698

10799

100+
{-| -}
108101
backgroundColor : { compatible | value : String, color : Compatible } -> Property
109102
backgroundColor { value } =
110103
Property ("background-color:" ++ value)
111104

112105

106+
{-| -}
113107
backgroundSize : LengthOrAutoOrCoverOrContain compatible -> Property
114108
backgroundSize { value } =
115109
Property ("background-size:" ++ value)
116110

117111

112+
{-| -}
118113
backgroundSize2 : LengthOrAutoOrCoverOrContain compatible -> LengthOrAutoOrCoverOrContain compatible -> Property
119114
backgroundSize2 arg1 arg2 =
120115
Property ("background-size:" ++ arg1.value ++ " " ++ arg2.value)
121116

122117

118+
{-| -}
123119
border : Length compatible units -> Property
124120
border { value } =
125121
Property ("border:" ++ value)
126122

127123

124+
{-| -}
128125
border2 : Length compatible units -> Length compatible units -> Property
129126
border2 arg1 arg2 =
130127
Property ("border:" ++ arg1.value ++ " " ++ arg2.value)
131128

132129

130+
{-| -}
133131
border3 : Length compatible units -> Length compatible units -> Length compatible units -> Property
134132
border3 arg1 arg2 arg3 =
135133
Property ("border:" ++ arg1.value ++ " " ++ arg2.value ++ " " ++ arg3.value)
136134

137135

136+
{-| -}
138137
borderBottom : Length compatible units -> Property
139138
borderBottom { value } =
140139
Property ("border-bottom:" ++ value)
141140

142141

142+
{-| -}
143143
borderBottom2 : Length compatible units -> Length compatible units -> Property
144144
borderBottom2 arg1 arg2 =
145145
Property ("border-bottom:" ++ arg1.value ++ " " ++ arg2.value)
146146

147147

148+
{-| -}
148149
borderBottom3 : Length compatible units -> Length compatible units -> Length compatible units -> Property
149150
borderBottom3 arg1 arg2 arg3 =
150151
Property ("border-bottom:" ++ arg1.value ++ " " ++ arg2.value ++ " " ++ arg3.value)

0 commit comments

Comments
 (0)