-
Notifications
You must be signed in to change notification settings - Fork 0
/
RawStyle.idr
2321 lines (2104 loc) · 78.9 KB
/
RawStyle.idr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
module RawStyle
import Attr
%default total
%access public
-- data Style' a = MkStyle' Ptr
data Style = MkStyle Ptr
data JsLength = Percent Float | Pixels Int
error : String -> a
error {a} str = unsafePerformIO $
mkForeign (FFun "console.log(%0)" [FString] (FAny a)) str
instance Num JsLength where
(Percent x) + (Percent y) = Percent (x+y)
(Pixels x) + (Pixels y) = Pixels (x+y)
_ + _ = error "JsLength.(+): Attempted to add Pixels and Percent."
(Percent x) - (Percent y) = Percent (x-y)
(Pixels x) - (Pixels y) = Pixels (x-y)
_ - _ = error "JsLength.(-): Attempted to subtract Pixels and Percent."
(Percent x) * (Percent y) = Percent (x*y)
(Pixels x) * (Pixels y) = Pixels (x*y)
_ * _ = error "JsLength.(*): Attempted to multiply Pixels and Percent."
fromInteger = Pixels . fromInteger
abs (Pixels x) = Pixels $ abs x
abs (Percent x) = Percent $ abs x
instance Cast JsLength Float where
cast (Percent p) = p
cast (Pixels p) = cast p
instance Cast Float JsLength where
cast = Pixels . cast
partial toIntPixels : JsLength -> Int
toIntPixels (Pixels p) = p
instance Show JsLength where
show (Percent p) = show p ++ "%"
show (Pixels p) = show p ++ "px"
instance Cast String JsLength where
cast "" = Pixels 0
cast str =
if "%" `isSuffixOf` str
then Percent . cast . pack $ takeWhile (/='%') (unpack str)
else Pixels . cast . pack $ takeWhile (not . isAlpha) (unpack str)
data JsTime =
Seconds Float
| Milliseconds Float
instance Show JsTime where
show (Seconds s) = show s ++ "s"
show (Milliseconds ms) = show ms ++ "ms"
instance Cast String JsTime where
cast str =
(if "ms" `isSuffixOf` str
then Milliseconds
else Seconds) . cast . pack $
takeWhile (not . isAlpha) (unpack str)
data Align =
Stretch
| Center
| FlexStart
| FlexEnd
| Baseline
instance Show Align where
show Stretch = "stretch"
show Center = "center"
show FlexStart = "flex-start"
show FlexEnd = "flex-end"
show Baseline = "baseline"
instance Cast String Align where
cast "stretch" = Stretch
cast "center" = Center
cast "flex-start" = FlexStart
cast "flex-end" = FlexEnd
cast "baseline" = Baseline
cast _ = Stretch
data PlayState = Running | Paused
instance Show PlayState where
show Running = "running"
show Paused = "paused"
instance Cast String PlayState where
cast "paused" = Paused
cast _ = Running
data BackgroundAttachment = Scroll | Fixed | Local
instance Show BackgroundAttachment where
show Scroll = "scroll"
show Fixed = "fixed"
show Local = "local"
instance Cast String BackgroundAttachment where
cast "fixed" = Fixed
cast "local" = Local
cast _ = Scroll
data RepeatStyle = Repeat | RepeatX | RepeatY | NoRepeat
instance Show RepeatStyle where
show Repeat = "repeat"
show RepeatX = "repeat-x"
show RepeatY = "repeat-y"
show NoRepeat = "no-repeat"
instance Cast String RepeatStyle where
cast "repeat-x" = RepeatX
cast "repeat-y" = RepeatY
cast "no-repeat" = NoRepeat
cast _ = Repeat
data Box = BorderBox | PaddingBox | ContentBox
instance Show Box where
show BorderBox = "border-box"
show PaddingBox = "padding-box"
show ContentBox = "content-box"
instance Cast String Box where
cast "padding-box" = PaddingBox
cast "content-box" = ContentBox
cast _ = BorderBox
data BackgroundSize =
MkBackgroundSize (Vect 2 JsLength)
| Cover
| Contain
| Auto
instance Show BackgroundSize where
show (MkBackgroundSize [x, y]) = show x ++ " " ++ show y
show Cover = "cover"
show Contain = "contain"
show Auto = "auto"
instance Cast String BackgroundSize where
cast "cover" = Cover
cast "contain" = Contain
cast "auto" = Auto
cast str =
let (x,y) = break (==' ') str
in MkBackgroundSize [cast x, cast y]
data Side = Top | Bottom | Left | Right
instance Show Side where
show Top = "top"
show Bottom = "bottom"
show Left = "left"
show Right = "right"
instance Cast String Side where
cast "bottom" = Bottom
cast "left" = Left
cast "right" = Right
cast _ = Top
data ClearStyle = None | ClearSide Side | Both
instance Show ClearStyle where
show None = "none"
show (ClearSide side) = show side
show Both = "both"
instance Cast String ClearStyle where
cast "left" = ClearSide Left
cast "right" = ClearSide Right
cast "both" = Both
cast _ = None
data Direction = LtR | RtL
instance Show Direction where
show LtR = "ltr"
show RtL = "rtl"
instance Cast String Direction where
cast "rtl" = RtL
cast _ = LtR
getAlignContent : Style -> IO Align
getAlignContent (MkStyle style) = cast `map`
mkForeign (FFun "%0.alignContent" [FPtr] FString) style
setAlignContent : Style -> Align -> IO ()
setAlignContent (MkStyle style) (val) =
mkForeign (FFun "%0.alignContent = %1" [FPtr, FString] FUnit)
style (show val)
alignContent : Attr Style Align
alignContent =
let getter = getAlignContent
setter = setAlignContent
in MkAttr getter setter
getAlignItems : Style -> IO Align
getAlignItems (MkStyle style) = cast `map`
mkForeign (FFun "%0.alignItems" [FPtr] FString) style
setAlignItems : Style -> Align -> IO ()
setAlignItems (MkStyle style) (val) =
mkForeign (FFun "%0.alignItems = %1" [FPtr, FString] FUnit)
style (show val)
alignItems : Attr Style Align
alignItems =
let getter = getAlignItems
setter = setAlignItems
in MkAttr getter setter
getAlignSelf : Style -> IO Align
getAlignSelf (MkStyle style) = cast `map`
mkForeign (FFun "%0.alignSelf" [FPtr] FString) style
setAlignSelf : Style -> Align -> IO ()
setAlignSelf (MkStyle style) (val) =
mkForeign (FFun "%0.alignSelf = %1" [FPtr, FString] FUnit)
style (show val)
alignSelf : Attr Style Align
alignSelf =
let getter = getAlignSelf
setter = setAlignSelf
in MkAttr getter setter
getAnimation : Style -> IO String
getAnimation (MkStyle style) =
mkForeign (FFun "%0.animation" [FPtr] FString) style
setAnimation : Style -> String -> IO ()
setAnimation (MkStyle style) (val) =
mkForeign (FFun "%0.animation = %1" [FPtr, FString] FUnit) style val
animation : Attr Style String
animation =
let getter = getAnimation
setter = setAnimation
in MkAttr getter setter
getAnimationName : Style -> IO String
getAnimationName (MkStyle style) =
mkForeign (FFun "%0.animationName" [FPtr] FString) style
setAnimationName : Style -> String -> IO ()
setAnimationName (MkStyle style) (val) =
mkForeign (FFun "%0.animationName = %1" [FPtr, FString] FUnit) style val
animationName : Attr Style String
animationName =
let getter = getAnimationName
setter = setAnimationName
in MkAttr getter setter
getAnimationPlayState : Style -> IO PlayState
getAnimationPlayState (MkStyle style) = cast `map`
mkForeign (FFun "%0.animationPlayState" [FPtr] FString) style
setAnimationPlayState : Style -> PlayState -> IO ()
setAnimationPlayState (MkStyle style) (val) =
mkForeign (FFun "%0.animationPlayState = %1" [FPtr, FString] FUnit)
style (show val)
animationPlayState : Attr Style PlayState
animationPlayState =
let getter = getAnimationPlayState
setter = setAnimationPlayState
in MkAttr getter setter
getBackground : Style -> IO String
getBackground (MkStyle style) =
mkForeign (FFun "%0.background" [FPtr] FString) style
setBackground : Style -> String -> IO ()
setBackground (MkStyle style) (val) =
mkForeign (FFun "%0.background = %1" [FPtr, FString] FUnit) style val
background : Attr Style String
background =
let getter = getBackground
setter = setBackground
in MkAttr getter setter
getBackgroundAttachment : Style -> IO BackgroundAttachment
getBackgroundAttachment (MkStyle style) = cast `map`
mkForeign (FFun "%0.backgroundAttachment" [FPtr] FString) style
setBackgroundAttachment : Style -> BackgroundAttachment -> IO ()
setBackgroundAttachment (MkStyle style) (val) =
mkForeign (FFun "%0.backgroundAttachment = %1" [FPtr, FString] FUnit)
style (show val)
backgroundAttachment : Attr Style BackgroundAttachment
backgroundAttachment =
let getter = getBackgroundAttachment
setter = setBackgroundAttachment
in MkAttr getter setter
getBackgroundColor : Style -> IO String
getBackgroundColor (MkStyle style) =
mkForeign (FFun "%0.backgroundColor" [FPtr] FString) style
setBackgroundColor : Style -> String -> IO ()
setBackgroundColor (MkStyle style) (val) =
mkForeign (FFun "%0.backgroundColor = %1" [FPtr, FString] FUnit) style val
backgroundColor : Attr Style String
backgroundColor =
let getter = getBackgroundColor
setter = setBackgroundColor
in MkAttr getter setter
getBackgroundImage : Style -> IO String
getBackgroundImage (MkStyle style) =
mkForeign (FFun "%0.backgroundImage" [FPtr] FString) style
setBackgroundImage : Style -> String -> IO ()
setBackgroundImage (MkStyle style) (val) =
mkForeign (FFun "%0.backgroundImage = %1" [FPtr, FString] FUnit) style val
backgroundImage : Attr Style String
backgroundImage =
let getter = getBackgroundImage
setter = setBackgroundImage
in MkAttr getter setter
getBackgroundPosition : Style -> IO String
getBackgroundPosition (MkStyle style) =
mkForeign (FFun "%0.backgroundPosition" [FPtr] FString) style
setBackgroundPosition : Style -> String -> IO ()
setBackgroundPosition (MkStyle style) (val) =
mkForeign (FFun "%0.backgroundPosition = %1" [FPtr, FString] FUnit) style val
backgroundPosition : Attr Style String
backgroundPosition =
let getter = getBackgroundPosition
setter = setBackgroundPosition
in MkAttr getter setter
getBackgroundRepeat : Style -> IO RepeatStyle
getBackgroundRepeat (MkStyle style) = cast `map`
mkForeign (FFun "%0.backgroundRepeat" [FPtr] FString) style
setBackgroundRepeat : Style -> RepeatStyle -> IO ()
setBackgroundRepeat (MkStyle style) (val) =
mkForeign (FFun "%0.backgroundRepeat = %1" [FPtr, FString] FUnit)
style (show val)
backgroundRepeat : Attr Style RepeatStyle
backgroundRepeat =
let getter = getBackgroundRepeat
setter = setBackgroundRepeat
in MkAttr getter setter
getBackgroundClip : Style -> IO Box
getBackgroundClip (MkStyle style) = cast `map`
mkForeign (FFun "%0.backgroundClip" [FPtr] FString) style
setBackgroundClip : Style -> Box -> IO ()
setBackgroundClip (MkStyle style) (val) =
mkForeign (FFun "%0.backgroundClip = %1" [FPtr, FString] FUnit)
style (show val)
backgroundClip : Attr Style Box
backgroundClip =
let getter = getBackgroundClip
setter = setBackgroundClip
in MkAttr getter setter
getBackgroundOrigin : Style -> IO Box
getBackgroundOrigin (MkStyle style) = cast `map`
mkForeign (FFun "%0.backgroundOrigin" [FPtr] FString) style
setBackgroundOrigin : Style -> Box -> IO ()
setBackgroundOrigin (MkStyle style) (val) =
mkForeign (FFun "%0.backgroundOrigin = %1" [FPtr, FString] FUnit)
style (show val)
backgroundOrigin : Attr Style Box
backgroundOrigin =
let getter = getBackgroundOrigin
setter = setBackgroundOrigin
in MkAttr getter setter
getBackgroundSize : Style -> IO BackgroundSize
getBackgroundSize (MkStyle style) = cast `map`
mkForeign (FFun "%0.backgroundSize" [FPtr] FString) style
setBackgroundSize : Style -> BackgroundSize -> IO ()
setBackgroundSize (MkStyle style) (val) =
mkForeign (FFun "%0.backgroundSize = %1" [FPtr, FString] FUnit)
style (show val)
backgroundSize : Attr Style BackgroundSize
backgroundSize =
let getter = getBackgroundSize
setter = setBackgroundSize
in MkAttr getter setter
getBackfaceVisibility : Style -> IO Bool
getBackfaceVisibility (MkStyle style) =
(\x => if x=="hidden" then False else True) `map`
mkForeign (FFun "%0.backfaceVisibility" [FPtr] FString) style
setBackfaceVisibility : Style -> Bool -> IO ()
setBackfaceVisibility (MkStyle style) (val) =
let valStr = if val then "visible" else "hidden"
in mkForeign (FFun "%0.backfaceVisibility = %1" [FPtr, FString] FUnit)
style valStr
backfaceVisibility : Attr Style Bool
backfaceVisibility =
let getter = getBackfaceVisibility
setter = setBackfaceVisibility
in MkAttr getter setter
getBorder : Style -> IO String
getBorder (MkStyle style) =
mkForeign (FFun "%0.border" [FPtr] FString) style
setBorder : Style -> String -> IO ()
setBorder (MkStyle style) (val) =
mkForeign (FFun "%0.border = %1" [FPtr, FString] FUnit) style val
border : Attr Style String
border =
let getter = getBorder
setter = setBorder
in MkAttr getter setter
getBorderBottom : Style -> IO String
getBorderBottom (MkStyle style) =
mkForeign (FFun "%0.borderBottom" [FPtr] FString) style
setBorderBottom : Style -> String -> IO ()
setBorderBottom (MkStyle style) (val) =
mkForeign (FFun "%0.borderBottom = %1" [FPtr, FString] FUnit) style val
borderBottom : Attr Style String
borderBottom =
let getter = getBorderBottom
setter = setBorderBottom
in MkAttr getter setter
getBorderBottomColor : Style -> IO String
getBorderBottomColor (MkStyle style) =
mkForeign (FFun "%0.borderBottomColor" [FPtr] FString) style
setBorderBottomColor : Style -> String -> IO ()
setBorderBottomColor (MkStyle style) (val) =
mkForeign (FFun "%0.borderBottomColor = %1" [FPtr, FString] FUnit) style val
borderBottomColor : Attr Style String
borderBottomColor =
let getter = getBorderBottomColor
setter = setBorderBottomColor
in MkAttr getter setter
getBorderBottomLeftRadius : Style -> IO JsLength
getBorderBottomLeftRadius (MkStyle style) = cast `map`
mkForeign (FFun "%0.borderBottomLeftRadius" [FPtr] FString) style
setBorderBottomLeftRadius : Style -> JsLength -> IO ()
setBorderBottomLeftRadius (MkStyle style) (val) =
mkForeign (FFun "%0.borderBottomLeftRadius = %1" [FPtr, FString] FUnit)
style (show val)
borderBottomLeftRadius : Attr Style JsLength
borderBottomLeftRadius =
let getter = getBorderBottomLeftRadius
setter = setBorderBottomLeftRadius
in MkAttr getter setter
getBorderBottomRightRadius : Style -> IO JsLength
getBorderBottomRightRadius (MkStyle style) = cast `map`
mkForeign (FFun "%0.borderBottomRightRadius" [FPtr] FString) style
setBorderBottomRightRadius : Style -> JsLength -> IO ()
setBorderBottomRightRadius (MkStyle style) (val) =
mkForeign (FFun "%0.borderBottomRightRadius = %1" [FPtr, FString] FUnit)
style (show val)
borderBottomRightRadius : Attr Style JsLength
borderBottomRightRadius =
let getter = getBorderBottomRightRadius
setter = setBorderBottomRightRadius
in MkAttr getter setter
getBorderBottomStyle : Style -> IO String
getBorderBottomStyle (MkStyle style) =
mkForeign (FFun "%0.borderBottomStyle" [FPtr] FString) style
setBorderBottomStyle : Style -> String -> IO ()
setBorderBottomStyle (MkStyle style) (val) =
mkForeign (FFun "%0.borderBottomStyle = %1" [FPtr, FString] FUnit) style val
borderBottomStyle : Attr Style String
borderBottomStyle =
let getter = getBorderBottomStyle
setter = setBorderBottomStyle
in MkAttr getter setter
getBorderBottomWidth : Style -> IO JsLength
getBorderBottomWidth (MkStyle style) = cast `map`
mkForeign (FFun "%0.borderBottomWidth" [FPtr] FString) style
setBorderBottomWidth : Style -> JsLength -> IO ()
setBorderBottomWidth (MkStyle style) (val) =
mkForeign (FFun "%0.borderBottomWidth = %1" [FPtr, FString] FUnit)
style (show val)
borderBottomWidth : Attr Style JsLength
borderBottomWidth =
let getter = getBorderBottomWidth
setter = setBorderBottomWidth
in MkAttr getter setter
getBorderCollapse : Style -> IO Bool
getBorderCollapse (MkStyle style) =
(\x => if x=="collapse" then True else False) `map`
mkForeign (FFun "%0.borderCollapse" [FPtr] FString) style
setBorderCollapse : Style -> Bool -> IO ()
setBorderCollapse (MkStyle style) (val) =
let valStr = if val then "collapse" else "seperate"
in mkForeign (FFun "%0.borderCollapse = %1" [FPtr, FString] FUnit)
style valStr
borderCollapse : Attr Style Bool
borderCollapse =
let getter = getBorderCollapse
setter = setBorderCollapse
in MkAttr getter setter
getBorderColor : Style -> IO String
getBorderColor (MkStyle style) =
mkForeign (FFun "%0.borderColor" [FPtr] FString) style
setBorderColor : Style -> String -> IO ()
setBorderColor (MkStyle style) (val) =
mkForeign (FFun "%0.borderColor = %1" [FPtr, FString] FUnit) style val
borderColor : Attr Style String
borderColor =
let getter = getBorderColor
setter = setBorderColor
in MkAttr getter setter
getBorderImage : Style -> IO String
getBorderImage (MkStyle style) =
mkForeign (FFun "%0.borderImage" [FPtr] FString) style
setBorderImage : Style -> String -> IO ()
setBorderImage (MkStyle style) (val) =
mkForeign (FFun "%0.borderImage = %1" [FPtr, FString] FUnit) style val
borderImage : Attr Style String
borderImage =
let getter = getBorderImage
setter = setBorderImage
in MkAttr getter setter
getBorderImageOutset : Style -> IO String
getBorderImageOutset (MkStyle style) =
mkForeign (FFun "%0.borderImageOutset" [FPtr] FString) style
setBorderImageOutset : Style -> String -> IO ()
setBorderImageOutset (MkStyle style) (val) =
mkForeign (FFun "%0.borderImageOutset = %1" [FPtr, FString] FUnit) style val
borderImageOutset : Attr Style String
borderImageOutset =
let getter = getBorderImageOutset
setter = setBorderImageOutset
in MkAttr getter setter
getBorderImageRepeat : Style -> IO String
getBorderImageRepeat (MkStyle style) =
mkForeign (FFun "%0.borderImageRepeat" [FPtr] FString) style
setBorderImageRepeat : Style -> String -> IO ()
setBorderImageRepeat (MkStyle style) (val) =
mkForeign (FFun "%0.borderImageRepeat = %1" [FPtr, FString] FUnit) style val
borderImageRepeat : Attr Style String
borderImageRepeat =
let getter = getBorderImageRepeat
setter = setBorderImageRepeat
in MkAttr getter setter
getBorderImageSlice : Style -> IO String
getBorderImageSlice (MkStyle style) =
mkForeign (FFun "%0.borderImageSlice" [FPtr] FString) style
setBorderImageSlice : Style -> String -> IO ()
setBorderImageSlice (MkStyle style) (val) =
mkForeign (FFun "%0.borderImageSlice = %1" [FPtr, FString] FUnit) style val
borderImageSlice : Attr Style String
borderImageSlice =
let getter = getBorderImageSlice
setter = setBorderImageSlice
in MkAttr getter setter
getBorderImageSource : Style -> IO String
getBorderImageSource (MkStyle style) =
mkForeign (FFun "%0.borderImageSource" [FPtr] FString) style
setBorderImageSource : Style -> String -> IO ()
setBorderImageSource (MkStyle style) (val) =
mkForeign (FFun "%0.borderImageSource = %1" [FPtr, FString] FUnit) style val
borderImageSource : Attr Style String
borderImageSource =
let getter = getBorderImageSource
setter = setBorderImageSource
in MkAttr getter setter
getBorderImageWidth : Style -> IO JsLength
getBorderImageWidth (MkStyle style) = cast `map`
mkForeign (FFun "%0.borderImageWidth" [FPtr] FString) style
setBorderImageWidth : Style -> JsLength -> IO ()
setBorderImageWidth (MkStyle style) (val) =
mkForeign (FFun "%0.borderImageWidth = %1" [FPtr, FString] FUnit)
style (show val)
borderImageWidth : Attr Style JsLength
borderImageWidth =
let getter = getBorderImageWidth
setter = setBorderImageWidth
in MkAttr getter setter
getBorderLeft : Style -> IO String
getBorderLeft (MkStyle style) =
mkForeign (FFun "%0.borderLeft" [FPtr] FString) style
setBorderLeft : Style -> String -> IO ()
setBorderLeft (MkStyle style) (val) =
mkForeign (FFun "%0.borderLeft = %1" [FPtr, FString] FUnit) style val
borderLeft : Attr Style String
borderLeft =
let getter = getBorderLeft
setter = setBorderLeft
in MkAttr getter setter
getBorderLeftColor : Style -> IO String
getBorderLeftColor (MkStyle style) =
mkForeign (FFun "%0.borderLeftColor" [FPtr] FString) style
setBorderLeftColor : Style -> String -> IO ()
setBorderLeftColor (MkStyle style) (val) =
mkForeign (FFun "%0.borderLeftColor = %1" [FPtr, FString] FUnit) style val
borderLeftColor : Attr Style String
borderLeftColor =
let getter = getBorderLeftColor
setter = setBorderLeftColor
in MkAttr getter setter
getBorderLeftStyle : Style -> IO String
getBorderLeftStyle (MkStyle style) =
mkForeign (FFun "%0.borderLeftStyle" [FPtr] FString) style
setBorderLeftStyle : Style -> String -> IO ()
setBorderLeftStyle (MkStyle style) (val) =
mkForeign (FFun "%0.borderLeftStyle = %1" [FPtr, FString] FUnit) style val
borderLeftStyle : Attr Style String
borderLeftStyle =
let getter = getBorderLeftStyle
setter = setBorderLeftStyle
in MkAttr getter setter
getBorderLeftWidth : Style -> IO JsLength
getBorderLeftWidth (MkStyle style) = cast `map`
mkForeign (FFun "%0.borderLeftWidth" [FPtr] FString) style
setBorderLeftWidth : Style -> JsLength -> IO ()
setBorderLeftWidth (MkStyle style) (val) =
mkForeign (FFun "%0.borderLeftWidth = %1" [FPtr, FString] FUnit)
style (show val)
borderLeftWidth : Attr Style JsLength
borderLeftWidth =
let getter = getBorderLeftWidth
setter = setBorderLeftWidth
in MkAttr getter setter
getBorderRadius : Style -> IO JsLength
getBorderRadius (MkStyle style) = cast `map`
mkForeign (FFun "%0.borderRadius" [FPtr] FString) style
setBorderRadius : Style -> JsLength -> IO ()
setBorderRadius (MkStyle style) (val) =
mkForeign (FFun "%0.borderRadius = %1" [FPtr, FString] FUnit)
style (show val)
borderRadius : Attr Style JsLength
borderRadius =
let getter = getBorderRadius
setter = setBorderRadius
in MkAttr getter setter
getBorderRight : Style -> IO String
getBorderRight (MkStyle style) =
mkForeign (FFun "%0.borderRight" [FPtr] FString) style
setBorderRight : Style -> String -> IO ()
setBorderRight (MkStyle style) (val) =
mkForeign (FFun "%0.borderRight = %1" [FPtr, FString] FUnit) style val
borderRight : Attr Style String
borderRight =
let getter = getBorderRight
setter = setBorderRight
in MkAttr getter setter
getBorderRightColor : Style -> IO String
getBorderRightColor (MkStyle style) =
mkForeign (FFun "%0.borderRightColor" [FPtr] FString) style
setBorderRightColor : Style -> String -> IO ()
setBorderRightColor (MkStyle style) (val) =
mkForeign (FFun "%0.borderRightColor = %1" [FPtr, FString] FUnit) style val
borderRightColor : Attr Style String
borderRightColor =
let getter = getBorderRightColor
setter = setBorderRightColor
in MkAttr getter setter
getBorderRightStyle : Style -> IO String
getBorderRightStyle (MkStyle style) =
mkForeign (FFun "%0.borderRightStyle" [FPtr] FString) style
setBorderRightStyle : Style -> String -> IO ()
setBorderRightStyle (MkStyle style) (val) =
mkForeign (FFun "%0.borderRightStyle = %1" [FPtr, FString] FUnit) style val
borderRightStyle : Attr Style String
borderRightStyle =
let getter = getBorderRightStyle
setter = setBorderRightStyle
in MkAttr getter setter
getBorderRightWidth : Style -> IO JsLength
getBorderRightWidth (MkStyle style) = cast `map`
mkForeign (FFun "%0.borderRightWidth" [FPtr] FString) style
setBorderRightWidth : Style -> JsLength -> IO ()
setBorderRightWidth (MkStyle style) (val) =
mkForeign (FFun "%0.borderRightWidth = %1" [FPtr, FString] FUnit)
style (show val)
borderRightWidth : Attr Style JsLength
borderRightWidth =
let getter = getBorderRightWidth
setter = setBorderRightWidth
in MkAttr getter setter
getBorderSpacing : Style -> IO JsLength
getBorderSpacing (MkStyle style) = cast `map`
mkForeign (FFun "%0.borderSpacing" [FPtr] FString) style
setBorderSpacing : Style -> JsLength -> IO ()
setBorderSpacing (MkStyle style) (val) =
mkForeign (FFun "%0.borderSpacing = %1" [FPtr, FString] FUnit)
style (show val)
borderSpacing : Attr Style JsLength
borderSpacing =
let getter = getBorderSpacing
setter = setBorderSpacing
in MkAttr getter setter
getBorderTop : Style -> IO String
getBorderTop (MkStyle style) =
mkForeign (FFun "%0.borderTop" [FPtr] FString) style
setBorderTop : Style -> String -> IO ()
setBorderTop (MkStyle style) (val) =
mkForeign (FFun "%0.borderTop = %1" [FPtr, FString] FUnit) style val
borderTop : Attr Style String
borderTop =
let getter = getBorderTop
setter = setBorderTop
in MkAttr getter setter
getBorderTopColor : Style -> IO String
getBorderTopColor (MkStyle style) =
mkForeign (FFun "%0.borderTopColor" [FPtr] FString) style
setBorderTopColor : Style -> String -> IO ()
setBorderTopColor (MkStyle style) (val) =
mkForeign (FFun "%0.borderTopColor = %1" [FPtr, FString] FUnit) style val
borderTopColor : Attr Style String
borderTopColor =
let getter = getBorderTopColor
setter = setBorderTopColor
in MkAttr getter setter
getBorderTopLeftRadius : Style -> IO JsLength
getBorderTopLeftRadius (MkStyle style) = cast `map`
mkForeign (FFun "%0.borderTopLeftRadius" [FPtr] FString) style
setBorderTopLeftRadius : Style -> JsLength -> IO ()
setBorderTopLeftRadius (MkStyle style) (val) =
mkForeign (FFun "%0.borderTopLeftRadius = %1" [FPtr, FString] FUnit)
style (show val)
borderTopLeftRadius : Attr Style JsLength
borderTopLeftRadius =
let getter = getBorderTopLeftRadius
setter = setBorderTopLeftRadius
in MkAttr getter setter
getBorderTopRightRadius : Style -> IO JsLength
getBorderTopRightRadius (MkStyle style) = cast `map`
mkForeign (FFun "%0.borderTopRightRadius" [FPtr] FString) style
setBorderTopRightRadius : Style -> JsLength -> IO ()
setBorderTopRightRadius (MkStyle style) (val) =
mkForeign (FFun "%0.borderTopRightRadius = %1" [FPtr, FString] FUnit)
style (show val)
borderTopRightRadius : Attr Style JsLength
borderTopRightRadius =
let getter = getBorderTopRightRadius
setter = setBorderTopRightRadius
in MkAttr getter setter
getBorderTopStyle : Style -> IO String
getBorderTopStyle (MkStyle style) =
mkForeign (FFun "%0.borderTopStyle" [FPtr] FString) style
setBorderTopStyle : Style -> String -> IO ()
setBorderTopStyle (MkStyle style) (val) =
mkForeign (FFun "%0.borderTopStyle = %1" [FPtr, FString] FUnit) style val
borderTopStyle : Attr Style String
borderTopStyle =
let getter = getBorderTopStyle
setter = setBorderTopStyle
in MkAttr getter setter
getBorderTopWidth : Style -> IO JsLength
getBorderTopWidth (MkStyle style) = cast `map`
mkForeign (FFun "%0.borderTopWidth" [FPtr] FString) style
setBorderTopWidth : Style -> JsLength -> IO ()
setBorderTopWidth (MkStyle style) (val) =
mkForeign (FFun "%0.borderTopWidth = %1" [FPtr, FString] FUnit)
style (show val)
borderTopWidth : Attr Style JsLength
borderTopWidth =
let getter = getBorderTopWidth
setter = setBorderTopWidth
in MkAttr getter setter
getBorderWidth : Style -> IO JsLength
getBorderWidth (MkStyle style) = cast `map`
mkForeign (FFun "%0.borderWidth" [FPtr] FString) style
setBorderWidth : Style -> JsLength -> IO ()
setBorderWidth (MkStyle style) (val) =
mkForeign (FFun "%0.borderWidth = %1" [FPtr, FString] FUnit)
style (show val)
borderWidth : Attr Style JsLength
borderWidth =
let getter = getBorderWidth
setter = setBorderWidth
in MkAttr getter setter
getBottom : Style -> IO String
getBottom (MkStyle style) =
mkForeign (FFun "%0.bottom" [FPtr] FString) style
setBottom : Style -> String -> IO ()
setBottom (MkStyle style) (val) =
mkForeign (FFun "%0.bottom = %1" [FPtr, FString] FUnit) style val
bottom : Attr Style String
bottom =
let getter = getBottom
setter = setBottom
in MkAttr getter setter
getBoxDecorationBreak : Style -> IO String
getBoxDecorationBreak (MkStyle style) =
mkForeign (FFun "%0.boxDecorationBreak" [FPtr] FString) style
setBoxDecorationBreak : Style -> String -> IO ()
setBoxDecorationBreak (MkStyle style) (val) =
mkForeign (FFun "%0.boxDecorationBreak = %1" [FPtr, FString] FUnit) style val
boxDecorationBreak : Attr Style String
boxDecorationBreak =
let getter = getBoxDecorationBreak
setter = setBoxDecorationBreak
in MkAttr getter setter
getBoxShadow : Style -> IO String
getBoxShadow (MkStyle style) =
mkForeign (FFun "%0.boxShadow" [FPtr] FString) style
setBoxShadow : Style -> String -> IO ()
setBoxShadow (MkStyle style) (val) =
mkForeign (FFun "%0.boxShadow = %1" [FPtr, FString] FUnit) style val
boxShadow : Attr Style String
boxShadow =
let getter = getBoxShadow
setter = setBoxShadow
in MkAttr getter setter
getBoxSizing : Style -> IO Box
getBoxSizing (MkStyle style) = cast `map`
mkForeign (FFun "%0.boxSizing" [FPtr] FString) style
setBoxSizing : Style -> Box -> IO ()
setBoxSizing (MkStyle style) (val) =
mkForeign (FFun "%0.boxSizing = %1" [FPtr, FString] FUnit)
style (show val)
boxSizing : Attr Style Box
boxSizing =
let getter = getBoxSizing
setter = setBoxSizing
in MkAttr getter setter
getCaptionSide : Style -> IO Side
getCaptionSide (MkStyle style) = cast `map`
mkForeign (FFun "%0.captionSide" [FPtr] FString) style
setCaptionSide : Style -> Side -> IO ()
setCaptionSide (MkStyle style) (val) =
mkForeign (FFun "%0.captionSide = %1" [FPtr, FString] FUnit)
style (show val)
captionSide : Attr Style Side
captionSide =
let getter = getCaptionSide
setter = setCaptionSide
in MkAttr getter setter
getClear : Style -> IO ClearStyle
getClear (MkStyle style) = cast `map`
mkForeign (FFun "%0.clear" [FPtr] FString) style
setClear : Style -> ClearStyle -> IO ()
setClear (MkStyle style) (val) =
mkForeign (FFun "%0.clear = %1" [FPtr, FString] FUnit)
style (show val)
clear : Attr Style ClearStyle
clear =
let getter = getClear
setter = setClear
in MkAttr getter setter
getClip : Style -> IO String
getClip (MkStyle style) =
mkForeign (FFun "%0.clip" [FPtr] FString) style
setClip : Style -> String -> IO ()
setClip (MkStyle style) (val) =
mkForeign (FFun "%0.clip = %1" [FPtr, FString] FUnit) style val
clip : Attr Style String
clip =
let getter = getClip
setter = setClip
in MkAttr getter setter
getColor : Style -> IO String
getColor (MkStyle style) =
mkForeign (FFun "%0.color" [FPtr] FString) style
setColor : Style -> String -> IO ()
setColor (MkStyle style) (val) =
mkForeign (FFun "%0.color = %1" [FPtr, FString] FUnit) style val
color : Attr Style String
color =
let getter = getColor
setter = setColor
in MkAttr getter setter
getColumnCount : Style -> IO String
getColumnCount (MkStyle style) =
mkForeign (FFun "%0.columnCount" [FPtr] FString) style
setColumnCount : Style -> String -> IO ()
setColumnCount (MkStyle style) (val) =
mkForeign (FFun "%0.columnCount = %1" [FPtr, FString] FUnit) style val
columnCount : Attr Style String
columnCount =
let getter = getColumnCount
setter = setColumnCount
in MkAttr getter setter
getColumnGap : Style -> IO JsLength
getColumnGap (MkStyle style) = cast `map`
mkForeign (FFun "%0.columnGap" [FPtr] FString) style
setColumnGap : Style -> JsLength -> IO ()
setColumnGap (MkStyle style) (val) =
mkForeign (FFun "%0.columnGap = %1" [FPtr, FString] FUnit)
style (show val)
columnGap : Attr Style JsLength
columnGap =
let getter = getColumnGap
setter = setColumnGap
in MkAttr getter setter
getColumnRule : Style -> IO String
getColumnRule (MkStyle style) =
mkForeign (FFun "%0.columnRule" [FPtr] FString) style
setColumnRule : Style -> String -> IO ()
setColumnRule (MkStyle style) (val) =
mkForeign (FFun "%0.columnRule = %1" [FPtr, FString] FUnit) style val
columnRule : Attr Style String
columnRule =
let getter = getColumnRule
setter = setColumnRule
in MkAttr getter setter
getColumnRuleColor : Style -> IO String
getColumnRuleColor (MkStyle style) =
mkForeign (FFun "%0.columnRuleColor" [FPtr] FString) style
setColumnRuleColor : Style -> String -> IO ()
setColumnRuleColor (MkStyle style) (val) =
mkForeign (FFun "%0.columnRuleColor = %1" [FPtr, FString] FUnit) style val
columnRuleColor : Attr Style String
columnRuleColor =
let getter = getColumnRuleColor
setter = setColumnRuleColor
in MkAttr getter setter
getColumnRuleStyle : Style -> IO String
getColumnRuleStyle (MkStyle style) =
mkForeign (FFun "%0.columnRuleStyle" [FPtr] FString) style
setColumnRuleStyle : Style -> String -> IO ()
setColumnRuleStyle (MkStyle style) (val) =
mkForeign (FFun "%0.columnRuleStyle = %1" [FPtr, FString] FUnit) style val
columnRuleStyle : Attr Style String
columnRuleStyle =
let getter = getColumnRuleStyle
setter = setColumnRuleStyle
in MkAttr getter setter
getColumnRuleWidth : Style -> IO JsLength
getColumnRuleWidth (MkStyle style) = cast `map`
mkForeign (FFun "%0.columnRuleWidth" [FPtr] FString) style
setColumnRuleWidth : Style -> JsLength -> IO ()
setColumnRuleWidth (MkStyle style) (val) =
mkForeign (FFun "%0.columnRuleWidth = %1" [FPtr, FString] FUnit)
style (show val)
columnRuleWidth : Attr Style JsLength
columnRuleWidth =
let getter = getColumnRuleWidth
setter = setColumnRuleWidth
in MkAttr getter setter
getColumns : Style -> IO String
getColumns (MkStyle style) =
mkForeign (FFun "%0.columns" [FPtr] FString) style
setColumns : Style -> String -> IO ()
setColumns (MkStyle style) (val) =
mkForeign (FFun "%0.columns = %1" [FPtr, FString] FUnit) style val
columns : Attr Style String
columns =
let getter = getColumns
setter = setColumns
in MkAttr getter setter
getColumnSpan : Style -> IO String
getColumnSpan (MkStyle style) =
mkForeign (FFun "%0.columnSpan" [FPtr] FString) style
setColumnSpan : Style -> String -> IO ()
setColumnSpan (MkStyle style) (val) =
mkForeign (FFun "%0.columnSpan = %1" [FPtr, FString] FUnit) style val
columnSpan : Attr Style String
columnSpan =
let getter = getColumnSpan
setter = setColumnSpan
in MkAttr getter setter
getColumnWidth : Style -> IO JsLength
getColumnWidth (MkStyle style) = cast `map`
mkForeign (FFun "%0.columnWidth" [FPtr] FString) style