Commit db71721
committed
Editor: Add support for text inputs to theme.json.
Adds support for text input elements to theme.json so that theme builders and extenders can be style text input elements consistently.
Text input elements are `textarea`, and `input` with type `email`, `number`, `password`, `search`, `text`, `tel` and `url`. We are targeting the HTML elements directly rather than adding a CSS class, as we do for other elements that theme.json supports. This commit adds no extra styling unless a theme opts in to use this and the specificity of any generated CSS with the element is 0.
See original Gutenberg PR: WordPress/gutenberg#70378.
Example usage:
{{{
"elements": {
"textInput": {
"border": {
"radius": "0",
"style": "solid",
"width": "1px",
"color": "red"
},
"color": {
"text": "var(--wp--preset--color--theme-2)"
},
"typography": {
"fontFamily": "var(--wp--preset--font-family--inter)"
}
}
}
}}}
Reviewed by mukesh27, scruffian.
Merges [9600] to the 6.9 branch.
Props onemaggie, mukesh27, sabernhardt, joen, get_dave, wildworks, ocean90, mikachan, poena.
Fixes #63878. See #63555.
git-svn-id: https://develop.svn.wordpress.org/trunk@61023 602fd350-edb4-49c9-b593-d223f7449a821 parent 35037e6 commit db71721
1 file changed
+13
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
613 | 613 | | |
614 | 614 | | |
615 | 615 | | |
| 616 | + | |
616 | 617 | | |
617 | 618 | | |
618 | 619 | | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
627 | 628 | | |
628 | | - | |
| 629 | + | |
629 | 630 | | |
630 | | - | |
631 | | - | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
632 | 634 | | |
633 | 635 | | |
634 | 636 | | |
| |||
0 commit comments