Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Prefixing values #32

Closed
eneroth opened this Issue · 2 comments

2 participants

@eneroth

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?

@noprompt
Owner

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;
}
@eneroth

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.