module Clay.Common where
import Clay.Property
import Data.String (IsString)
import Data.Monoid (Monoid, (<>))
class All a where all :: a
class Auto a where auto :: a
class Inherit a where inherit :: a
class None a where none :: a
class Normal a where normal :: a
class Visible a where visible :: a
class Hidden a where hidden :: a
class Initial a where initial :: a
class Unset a where unset :: a
class Other a where other :: Value -> a
instance All Value where all = "all"
instance Auto Value where auto = "auto"
instance Inherit Value where inherit = "inherit"
instance Normal Value where normal = "normal"
instance None Value where none = "none"
instance Visible Value where visible = "visible"
instance Hidden Value where hidden = "hidden"
instance Other Value where other = id
instance Initial Value where initial = "initial"
instance Unset Value where unset = "unset"
browsers :: Prefixed
browsers = Prefixed
[ ( "-webkit-", "" )
, ( "-moz-", "" )
, ( "-ms-", "" )
, ( "-o-", "" )
, ( "", "" )
]
call :: (IsString s, Monoid s) => s -> s -> s
call fn arg = fn <> "(" <> arg <> ")"