File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ version: 2.1
33defaults : &defaults
44 working_directory : ~/postcss-themed
55 docker :
6- - image : circleci/node:8.14 -browsers
6+ - image : circleci/node:10 -browsers
77 environment :
88 TZ : ' /usr/share/zoneinfo/America/Los_Angeles'
99
Original file line number Diff line number Diff line change @@ -113,6 +113,45 @@ See [PostCSS] docs for examples for your environment.
113113}
114114```
115115
116+ ### Theming with Objects
117+
118+ You can even keep theme values in deeply nested objects.
119+
120+ ** Input:**
121+
122+ ``` js
123+ const config = {
124+ default: {
125+ colors: {
126+ primary: ' white' ,
127+ },
128+ },
129+ other: {
130+ colors: {
131+ primary: ' black' ,
132+ },
133+ },
134+ };
135+ ```
136+
137+ ``` css
138+ .foo {
139+ color : @theme colors.primary;
140+ }
141+ ```
142+
143+ ** Output:**
144+
145+ ``` css
146+ .foo {
147+ color : white ;
148+ }
149+
150+ .other .foo {
151+ color : black ;
152+ }
153+ ```
154+
116155### Component themes
117156
118157Define a component level theme in either commonjs or typescript. A file names ` themes.(js|ts) ` must be co-located with the themeable CSS file.
You can’t perform that action at this time.
0 commit comments