Skip to content

Commit 476087a

Browse files
committed
Add Top, Middle, and Bottom type classes.
1 parent 81d1c35 commit 476087a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/CSS/Common.purs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ class Hidden a where hidden :: a
2828
class Initial a where initial :: a
2929
class Unset a where unset :: a
3030

31+
class Top a where top :: a
32+
class Middle a where middle :: a
33+
class Bottom a where bottom :: a
34+
3135
-- | The other type class is used to escape from the type safety introduced by
3236
-- embedding CSS properties into the typed world of purescript-css.
3337
-- `Other` allows you to cast any `Value` to a specific value type.
@@ -47,6 +51,10 @@ instance otherValue :: Other Value where other = id
4751
instance initialValue :: Initial Value where initial = fromString "initial"
4852
instance unsetValue :: Unset Value where unset = fromString "unset"
4953

54+
instance topValue :: Top Value where top = fromString "top"
55+
instance middleValue :: Middle Value where middle = fromString "middle"
56+
instance bottomValue :: Bottom Value where bottom = fromString "bottom"
57+
5058
-------------------------------------------------------------------------------
5159

5260
-- | Common list browser prefixes to make experimental properties work in

0 commit comments

Comments
 (0)