Skip to content

Commit a1f0da8

Browse files
committed
Merge pull request #18 from cryogenian/text-align-overflow
text-align, overflow
2 parents a7d476e + 11a526f commit a1f0da8

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed

src/CSS/Overflow.purs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
module CSS.Overflow where
2+
3+
import Prelude
4+
5+
import CSS.Property
6+
import CSS.String
7+
import CSS.Stylesheet
8+
9+
newtype Overflow = Overflow Value
10+
11+
instance valOverflow :: Val Overflow where
12+
value (Overflow v) = v
13+
14+
overflow :: Overflow -> CSS
15+
overflow = key $ fromString "overflow"
16+
17+
overflowX :: Overflow -> CSS
18+
overflowX = key $ fromString "overflow-x"
19+
20+
overflowY :: Overflow -> CSS
21+
overflowY = key $ fromString "overflow-y"
22+
23+
overflowAuto :: Overflow
24+
overflowAuto = Overflow $ fromString "auto"
25+
26+
hidden :: Overflow
27+
hidden = Overflow $ fromString "hidden"
28+
29+
scroll :: Overflow
30+
scroll = Overflow $ fromString "scroll"
31+
32+
visible :: Overflow
33+
visible = Overflow $ fromString "visible"
34+
35+
overflowInherit :: Overflow
36+
overflowInherit = Overflow $ fromString "inherit"

src/CSS/TextAlign.purs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
module CSS.TextAlign where
2+
3+
import Prelude
4+
5+
import CSS.Property
6+
import CSS.String
7+
import CSS.Stylesheet
8+
9+
newtype TextAlign = TextAlign Value
10+
11+
instance valTextAlign :: Val TextAlign where
12+
value (TextAlign v) = v
13+
14+
textAlign :: TextAlign -> CSS
15+
textAlign = key $ fromString "text-align"
16+
17+
center :: TextAlign
18+
center = TextAlign $ fromString "center"
19+
20+
justify :: TextAlign
21+
justify = TextAlign $ fromString "justify"
22+
23+
leftTextAlign :: TextAlign
24+
leftTextAlign = TextAlign $ fromString "left"
25+
26+
rightTextAlign :: TextAlign
27+
rightTextAlign = TextAlign $ fromString "right"
28+
29+
inheritTextAlign :: TextAlign
30+
inheritTextAlign = TextAlign $ fromString "inherit"
31+
32+
startTextAlign :: TextAlign
33+
startTextAlign = TextAlign $ fromString "start"
34+
35+
endTextAlign :: TextAlign
36+
endTextAlign = TextAlign $ fromString "end"

0 commit comments

Comments
 (0)