Skip to content

Commit

Permalink
JSON Schema Reorganization and Fixes (#63591)
Browse files Browse the repository at this point in the history
Co-authored-by: ajlende <ajlende@git.wordpress.org>
Co-authored-by: scruffian <scruffian@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
  • Loading branch information
4 people authored Jul 23, 2024
1 parent 271c085 commit e39dad5
Show file tree
Hide file tree
Showing 6 changed files with 627 additions and 877 deletions.
2 changes: 1 addition & 1 deletion bin/api-docs/gen-theme-reference.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ const formatType = ( prop ) => {
// Settings
const settings = Object.entries( themejson.definitions )
.filter( ( [ settingsKey ] ) =>
/^settingsProperties(?!Complete)\w+$/.test( settingsKey )
/^settings\w+Properties$/.test( settingsKey )
)
.reduce(
( settingsObj, [ , { properties } ] ) =>
Expand Down
115 changes: 52 additions & 63 deletions docs/reference-guides/theme-json-reference/theme-json-living.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ Setting that enables the following UI tools:

---

### useRootPaddingAwareAlignments

_**Note:** Since WordPress 6.1._

Enables root padding (the values from `styles.spacing.padding`) to be applied to the contents of full-width blocks instead of the root block.
### background

Please note that when using this setting, `styles.spacing.padding` should always be set as an object with `top`, `right`, `bottom`, `left` values declared separately.
Settings related to background.

| Property | Type | Default | Props |
| --- | --- | --- |--- |
| backgroundImage | boolean | false | |
| backgroundSize | boolean | false | |

---

Expand All @@ -63,17 +63,6 @@ Settings related to borders.

---

### shadow

Settings related to shadows.

| Property | Type | Default | Props |
| --- | --- | --- |--- |
| defaultPresets | boolean | true | |
| presets | array | | name, shadow, slug |

---

### color

Settings related to colors.
Expand All @@ -98,17 +87,6 @@ Settings related to colors.

---

### background

Settings related to background.

| Property | Type | Default | Props |
| --- | --- | --- |--- |
| backgroundImage | boolean | false | |
| backgroundSize | boolean | false | |

---

### dimensions

Settings related to dimensions.
Expand Down Expand Up @@ -156,6 +134,17 @@ Settings related to position.

---

### shadow

Settings related to shadows.

| Property | Type | Default | Props |
| --- | --- | --- |--- |
| defaultPresets | boolean | true | |
| presets | array | | name, shadow, slug |

---

### spacing

Settings related to spacing.
Expand Down Expand Up @@ -249,56 +238,44 @@ Color styles.

---

### dimensions
### css

Dimensions styles
Sets custom CSS to apply styling not covered by other theme.json properties.

| Property | Type | Props |
| --- | --- |--- |
| aspectRatio | string, object | |
| minHeight | string, object | |

---

### spacing
### dimensions

Spacing styles.
Dimensions styles.

| Property | Type | Props |
| --- | --- |--- |
| blockGap | string, object | |
| margin | object | bottom, left, right, top |
| padding | object | bottom, left, right, top |
| aspectRatio | string, object | |
| minHeight | string, object | |

---

### typography
### filter

Typography styles.
CSS and SVG filter styles.

| Property | Type | Props |
| --- | --- |--- |
| fontFamily | string, object | |
| fontSize | string, object | |
| fontStyle | string, object | |
| fontWeight | string, object | |
| letterSpacing | string, object | |
| lineHeight | string, object | |
| textAlign | string | |
| textColumns | string | |
| textDecoration | string, object | |
| writingMode | string, object | |
| textTransform | string, object | |
| duotone | string, object | |

---

### filter
### outline

CSS and SVG filter styles.
Outline styles.

| Property | Type | Props |
| --- | --- |--- |
| duotone | string, object | |
| color | string, object | |
| offset | string, object | |
| style | string, object | |
| width | string, object | |

---

Expand All @@ -309,23 +286,35 @@ Box shadow styles.

---

### outline
### spacing

Outline styles.
Spacing styles.

| Property | Type | Props |
| --- | --- |--- |
| color | string, object | |
| offset | string, object | |
| style | string, object | |
| width | string, object | |
| blockGap | string, object | |
| margin | object | bottom, left, right, top |
| padding | object | bottom, left, right, top |

---

### css
### typography

Sets custom CSS to apply styling not covered by other theme.json properties.
Typography styles.

| Property | Type | Props |
| --- | --- |--- |
| fontFamily | string, object | |
| fontSize | string, object | |
| fontStyle | string, object | |
| fontWeight | string, object | |
| letterSpacing | string, object | |
| lineHeight | string, object | |
| textAlign | string, object | |
| textColumns | string, object | |
| textDecoration | string, object | |
| writingMode | string, object | |
| textTransform | string, object | |

---
## customTemplates
Expand Down
Loading

0 comments on commit e39dad5

Please sign in to comment.