Closed ddssff closed 9 months ago
Ah, I wasn't aware the rendering of Number
is broken. Can you give an example of what went wrong?
Without fix:
Number {unNumber = 0.00000}% {visibility:visible;}
With fix:
0% {visibility:visible;}
It is assuming the automatically derived Show
instance is a renderer, the way the show instance for Double
is. In my opinion, it is better to use the Pretty
printer for this.
But you could just replace the call to show
with showFixed True . unNumber
I think even better would be to use fromText $ cssNumberText p
. I definitely wouldn't want to incur an extra dependency for this.
Whatever works!
Ok, pretty dependency removed.
Warnings fixed.
Thanks a lot!
Do not use the the Show instance of Clay.Property.Number for rendering. Instead add an instance of Pretty that uses the showFixed function of the underlying Fixed value. Adds a test case to spec/Clay/MediaSpec.hs that demonstrates the resulting output of the keyframes function.