re-com
re-com copied to clipboard
Feature request: automatic webkitification of applicable attrs
Hi,
It seems like this function would be good to apply to all styles coming into re-com (as it doesn't seem to be the sort of thing that everyone will want to define for themselves):
(defn wk [styles]
(let [attrs [:flex :flex-flow :align-items :align-self]
mapping (zipmap attrs (map (fn [a] (keyword (str "-webkit-" (name a)))) attrs))]
(merge styles (rename-keys (select-keys styles attrs) mapping))))
[The attrs list is of course incomplete at this point].
Could you provide more detail? Is this to solve a specific problem you are having? Or just a general cross-browser thing?
We're not in favour of this as web prefixes are being added and (more often) removed fairly regularly and this would require continuous maintenance.
For example, see this link for flexbox styles: http://caniuse.com/#search=flexbox which suggests that prefixes are no longer required.
Yes, general.
Prefixes are certainly still required-- not sure how that link proves any different...