Skip to content

Commit 6e3cf0b

Browse files
committed
Document link color
1 parent 6a90f56 commit 6e3cf0b

1 file changed

Lines changed: 46 additions & 13 deletions

File tree

docs/designers-developers/developers/themes/theme-json.md

Lines changed: 46 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ The Block Editor surface API has evolved at different velocities, and it's now a
1616

1717
This describes the current efforts to consolidate the various APIs into a single point – a `experimental-theme.json` file that should be located inside the root of the theme directory.
1818

19-
When this file is present a few Block Editor mechanisms are activated.
20-
2119
### Presets become CSS Custom Properties
2220

2321
Presets such as [color palettes](https://developer.wordpress.org/block-editor/developers/themes/theme-support/#block-color-palettes), [font sizes](https://developer.wordpress.org/block-editor/developers/themes/theme-support/#block-font-sizes), and [gradients](https://developer.wordpress.org/block-editor/developers/themes/theme-support/#block-gradient-presets) will be enqueued as CSS Custom Properties for themes to use.
@@ -98,7 +96,7 @@ Some of the functions are context-dependant. Take, as an example, the drop cap:
9896
}
9997
```
10098

101-
In the example above, we aim to encapsulate that the drop cap should be disabled globally but enabled in the paragraph context. The drop cap in the Image block context wouldn't make sense based on the current implementation so would be ignored, but it could be used by plugins that extend its functionality.
99+
In the example above, we aim to encapsulate that the drop cap should be disabled globally but enabled in the paragraph context. Based on the current implementation, the drop cap in the Image block context wouldn't make sense so it would be ignored (but it could be used by plugins that extend its functionality).
102100

103101
## Current Status
104102

@@ -159,16 +157,29 @@ If the `experimental-theme.json` contains any presets, these will take precedenc
159157

160158
Each block will declare which style properties it exposes. This has been coined as "implicit style attributes" of the block. These properties are then used to automatically generate the UI controls for the block in the editor, as well as being available through the `experimental-theme.json` file for themes to target.
161159

162-
The list of properties that are currently exposed via this method are:
160+
#### Color Properties
161+
162+
| Context | Background | Gradient | Link | Text |
163+
| --- | --- | --- | --- | --- |
164+
| Global | Yes | - | - | - |
165+
| Paragraph | Yes | - | Yes | Yes |
166+
| Heading [1] | Yes | - | Yes | Yes |
167+
| Group | Yes | Yes | Yes | Yes |
168+
| Columns | Yes | Yes | Yes | Yes |
169+
| Media & text | Yes | Yes | Yes | Yes |
170+
171+
[1] The heading block represents 6 distinct HTML elements: H1-H6. It comes with selectors to target each individual element (ex: core/heading/h1 for H1, etc).
172+
173+
#### Typography Properties
163174

164-
| Context | Text's Color | Background's Color | Background's Gradient | Font Size | Line Height |
165-
| --- | --- | --- | --- | --- | --- |
166-
| Global | - | Yes | - | - | - |
167-
| Paragraph | Yes | Yes | - | Yes | Yes |
168-
| Heading [1] | Yes | Yes | - | Yes | Yes |
169-
| Group | Yes | Yes | Yes | - | - |
170-
| Columns | Yes | Yes | Yes | - | - |
171-
| Media & text | Yes | Yes | Yes | - | - |
175+
| Context | Font Size | Line Height |
176+
| --- | --- | --- |
177+
| Global | - | - |
178+
| Paragraph | Yes | Yes |
179+
| Heading [1] | Yes | Yes |
180+
| Group | - | - |
181+
| Columns | - | - |
182+
| Media & text | - | - |
172183

173184
[1] The heading block represents 6 distinct HTML elements: H1-H6. It comes with selectors to target each individual element (ex: core/heading/h1 for H1, etc).
174185

@@ -245,13 +256,14 @@ The list of features that are currently supported are:
245256
"styles: {
246257
"color: {
247258
"background": <value>
248-
}
259+
}
249260
}
250261
},
251262
"core/paragraph": {
252263
"styles": {
253264
"color": {
254265
"background": <value>,
266+
"link": <value>,
255267
"text": <value>
256268
},
257269
"typography": {
@@ -264,6 +276,7 @@ The list of features that are currently supported are:
264276
"styles": {
265277
"color": {
266278
"background": <value>,
279+
"link": <value>,
267280
"text": <value>
268281
},
269282
"typography": {
@@ -276,6 +289,7 @@ The list of features that are currently supported are:
276289
"styles": {
277290
"color": {
278291
"background": <value>,
292+
"link": <value>,
279293
"text": <value>
280294
},
281295
"typography": {
@@ -288,6 +302,20 @@ The list of features that are currently supported are:
288302
"styles": {
289303
"color": {
290304
"background": <value>,
305+
"link": <value>,
306+
"text": <value>
307+
},
308+
"typography": {
309+
"fontSize": <value>,
310+
"lineHeight": <value>
311+
}
312+
}
313+
},
314+
"core/heading/h4": {
315+
"styles": {
316+
"color": {
317+
"background": <value>,
318+
"link": <value>,
291319
"text": <value>
292320
},
293321
"typography": {
@@ -300,6 +328,7 @@ The list of features that are currently supported are:
300328
"styles": {
301329
"color": {
302330
"background": <value>,
331+
"link": <value>,
303332
"text": <value>
304333
},
305334
"typography": {
@@ -312,6 +341,7 @@ The list of features that are currently supported are:
312341
"styles": {
313342
"color": {
314343
"background": <value>,
344+
"link": <value>,
315345
"text": <value>
316346
},
317347
"typography": {
@@ -325,6 +355,7 @@ The list of features that are currently supported are:
325355
"color": {
326356
"background": <value>,
327357
"gradient": <value>,
358+
"link": <value>,
328359
"text": <value>
329360
}
330361
}
@@ -334,6 +365,7 @@ The list of features that are currently supported are:
334365
"color": {
335366
"background": <value>,
336367
"gradient": <value>,
368+
"link": <value>,
337369
"text": <value>
338370
}
339371
}
@@ -343,6 +375,7 @@ The list of features that are currently supported are:
343375
"color": {
344376
"background": <value>,
345377
"gradient": <value>,
378+
"link": <value>,
346379
"text": <value>
347380
}
348381
}

0 commit comments

Comments
 (0)