javivelasco / javivelasco/react-css-themr

Deeply merging enhancement

Open
#19 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
589
Forks
65
PR merge metrics
No merged PRs in 30d

Description

> Deeply merging: theme objects are merged and if a key is present in more than one object, the values for each objects are concatenated.

While this does offer the most flexibility, I think it can be improved to override styles set by parent themes/defaults.

```



```

Take this example. I think it would be cool to see specific nested styles defined in **global** overwritten if also defined by **specialCase**.

@javivelasco If I am understanding correctly, this might be pending work on **postcss-apply**?

Post Edit:

Note current work arounds are to use selectors that are more specific and/or override using `!important`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the existing theme merge behavior around the nested ThemeProvider example and review the referenced postcss-apply work. Done means nested styles defined by specialCase override the corresponding global or default styles while unrelated theme values continue to merge.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.