Skip to content

Commit d0db508

Browse files
committed
Add show instances for float and clear using gShow.
1 parent 538e6f6 commit d0db508

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/CSS/Display.purs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import CSS.Common (class Inherit, class None)
55
import CSS.Property (class Val, Value)
66
import CSS.String (fromString)
77
import CSS.Stylesheet (CSS, key)
8-
import Data.Generic (class Generic)
8+
import Data.Generic (class Generic, gShow)
99

1010
newtype Position = Position Value
1111

@@ -108,6 +108,12 @@ display = key $ fromString "display"
108108

109109
data Float = FloatLeft | FloatRight | FloatNone
110110

111+
derive instance eqFloat :: Eq Float
112+
derive instance genericFloat :: Generic Float
113+
114+
instance showFloat :: Show Float where
115+
show = gShow
116+
111117
instance valFloat :: Val (Float) where
112118
value (FloatLeft) = fromString "left"
113119
value (FloatRight) = fromString "right"
@@ -134,6 +140,12 @@ data ClearFloat
134140
| ClearFloatInlineStart
135141
| ClearFloatInlineEnd
136142

143+
derive instance eqClearFloat :: Eq ClearFloat
144+
derive instance genericClearFloat :: Generic ClearFloat
145+
146+
instance showClearFloat :: Show ClearFloat where
147+
show = gShow
148+
137149
instance valClearFloat :: Val (ClearFloat) where
138150
value (ClearFloatLeft) = fromString "left"
139151
value (ClearFloatRight) = fromString "right"

0 commit comments

Comments
 (0)