Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Prefixing values #32

eneroth opened this Issue · 2 comments

2 participants


For some CSS rules, it is the value that needs to be prefixed rather than the selector. The particular case I'm running into is flex box, where i need to write

display: flex
display: -webkit-flex

in order to get it to work in Safari. How would I go about achieving this?


You could create a simple "mixin" using a set value:

(def flex
  {:display #{:flex :-webkit-flex}})

or the (talkative) way with a list:

(def flex
  (list {:display :flex}
        {:display :-webkit-flex}))

to achieve this. In both cases

(css [:x flex])

will give you the following result.

x {
  display: flex;
  display: -webkit-flex;

Great! Thank you!

@eneroth eneroth closed this
@noprompt noprompt added the answered label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.