sebastiaanvisser / clay

A CSS preprocessor as embedded Haskell.
Other
360 stars 73 forks source link

boxShadow none #144

Closed waddlaw closed 7 years ago

waddlaw commented 7 years ago

My test code following:

{-# LANGUAGE OverloadedStrings #-}

import Clay

main :: IO ()
main =
  putCss $ do
    a # ".contact" ? do
      boxShadow (px 2) (px 2) nil "#555"
      hover & boxShadow none

boxShadow none is invalid code. but, I want to this.

What should I do?

3noch commented 7 years ago

You will likely have to make this one yourself. But it's easy. Inspecting the source led to this:

import Clay.Stylesheet
main = putCss $ prefixed (browsers <> "box-shadow") ("none" :: Value)
waddlaw commented 7 years ago

@3noch thanks a lot!

Clay doesn't export prefixed... Clay.Stylesheet very useful for me. I didn't know that at all!

thanks.

3noch commented 7 years ago

@waddlaw Glad to help. I still think it'd be much better if there were a nice API for this.