Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON Schema Reorganization and Fixes #63591

Merged
merged 20 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useRootPaddingAwareAlignments is removed in this PR, but returned in #63639. I wanted to keep the codegen changes in a separate PR, but the existing codegen didn't support the refactored structure which is why it is missing here.


_**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
Loading