Open jdamner opened 10 months ago
I just wanted to add to this issue that this inconsistency effects any properties that can take an object
in addition to a string
.
For example, if I have a font size declared like this
"fontSize":"14px"
or "fontSize":"var(...)"
on one element, I can reference it from another element.
But if I have a font size declared like this
"fontSize": {
"fluid": {
"min": "1.25rem",
"max": "1.5rem"
},
"size": "1.5rem"
}
it cannot be referenced from another element.
What problem does this address?
At the moment, you can only
ref
to another single value intheme.json
, but quite often you might want different elements/blocks to share the same settings. For example, thecore/post-title
block you may wish to have the same settings as thecore/heading
block so that the post-title inherits any settings for heading such as typography and font-sizes.Another example where this would make perfect sense would be the
core/query-pagination-next
andcore/query-pagination-previous
- typically I'd expect most themes to want these two blocks to share the same settings/styles and at the moment duplication is required in order to achieve this.What is your proposed solution?
To enable
ref
to refer to a whole section of settings intheme.json
. Effectively have the following example work as you'd expect.In this instance, I would expect the
core/heading
andcore/post-title
should inherit the same settings, and thecore/query-pagination-next
andcore/query-pagination-previous
should share the same styles.