File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -218,6 +218,7 @@ module Miso.Style
218
218
, ms
219
219
-- *** Misc
220
220
, url
221
+ , matrix
221
222
-- *** Animation
222
223
, keyframes_
223
224
-- *** Media Queries
@@ -272,9 +273,31 @@ s x = MS.ms x <> "s"
272
273
ms :: Double -> MisoString
273
274
ms x = MS. ms x <> " ms"
274
275
-----------------------------------------------------------------------------
276
+ -- | https://developer.mozilla.org/en-US/docs/Web/CSS/url_function
275
277
url :: MisoString -> MisoString
276
278
url x = " url(" <> x <> " )"
277
279
-----------------------------------------------------------------------------
280
+ -- | https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix
281
+ matrix
282
+ :: Double
283
+ -> Double
284
+ -> Double
285
+ -> Double
286
+ -> Double
287
+ -> Double
288
+ -> MisoString
289
+ matrix a b c d tx ty = " matrix(" <> values <> " )"
290
+ where
291
+ values =
292
+ MS. intercalate " ,"
293
+ [ MS. ms a
294
+ , MS. ms b
295
+ , MS. ms c
296
+ , MS. ms d
297
+ , MS. ms tx
298
+ , MS. ms ty
299
+ ]
300
+ -----------------------------------------------------------------------------
278
301
-- | https://developer.mozilla.org/en-US/docs/Web/CSS/percentage
279
302
pct :: Double -> MisoString
280
303
pct x = MS. ms x <> " %"
You can’t perform that action at this time.
0 commit comments