day8 / day8/re-com

Feature request: automatic webkitification of applicable attrs

Open
#100 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Clojure
Stars
823
Forks
142
PR merge metrics
No merged PRs in 30d

Description

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].

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the proposed wk function and the points where styles enter re-com. Determine the complete set of applicable attributes and how automatic webkitification should behave; the issue is done when users no longer need to define these mappings themselves.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.