Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions src/CSS/Overflow.purs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module CSS.Overflow where

import Prelude

import CSS.Property
import CSS.String
import CSS.Stylesheet

newtype Overflow = Overflow Value

instance valOverflow :: Val Overflow where
value (Overflow v) = v

overflow :: Overflow -> CSS
overflow = key $ fromString "overflow"

overflowX :: Overflow -> CSS
overflowX = key $ fromString "overflow-x"

overflowY :: Overflow -> CSS
overflowY = key $ fromString "overflow-y"

overflowAuto :: Overflow
overflowAuto = Overflow $ fromString "auto"

hidden :: Overflow
hidden = Overflow $ fromString "hidden"

scroll :: Overflow
scroll = Overflow $ fromString "scroll"

visible :: Overflow
visible = Overflow $ fromString "visible"

overflowInherit :: Overflow
overflowInherit = Overflow $ fromString "inherit"
36 changes: 36 additions & 0 deletions src/CSS/TextAlign.purs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module CSS.TextAlign where

import Prelude

import CSS.Property
import CSS.String
import CSS.Stylesheet

newtype TextAlign = TextAlign Value

instance valTextAlign :: Val TextAlign where
value (TextAlign v) = v

textAlign :: TextAlign -> CSS
textAlign = key $ fromString "text-align"

center :: TextAlign
center = TextAlign $ fromString "center"

justify :: TextAlign
justify = TextAlign $ fromString "justify"

leftTextAlign :: TextAlign
leftTextAlign = TextAlign $ fromString "left"

rightTextAlign :: TextAlign
rightTextAlign = TextAlign $ fromString "right"

inheritTextAlign :: TextAlign
inheritTextAlign = TextAlign $ fromString "inherit"

startTextAlign :: TextAlign
startTextAlign = TextAlign $ fromString "start"

endTextAlign :: TextAlign
endTextAlign = TextAlign $ fromString "end"