Skip to content

Commit

Permalink
Update section styles with latest Gutenberg/WordPress changes.
Browse files Browse the repository at this point in the history
This moves section styles within global style variations to the `styles.variations` property. It also removes the `blockTypes` definitions for each style variation.

See: WordPress/gutenberg#62712
  • Loading branch information
justintadlock committed Jun 25, 2024
1 parent a9b57c4 commit 021a32a
Show file tree
Hide file tree
Showing 9 changed files with 572 additions and 652 deletions.
53 changes: 25 additions & 28 deletions styles/global/a-little-bit-bookish.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,39 +317,36 @@
"fontSize": "var:preset|font-size|md",
"lineHeight": "var:custom|line-height|md"
}
}
},
"variations": {
"card": {
"border": {
"color": "var:custom|global|border-color",
"style": "var:custom|global|border-style",
"width": "var:custom|global|border-width"
},
"color": {
"background": "var:preset|color|neutral-50"
}
},
"variations": {
"card": {
"blockTypes": [ "core/group" ],
"border": {
"card-footer": {
"border": {
"top": {
"color": "var:custom|global|border-color",
"style": "var:custom|global|border-style",
"width": "var:custom|global|border-width"
},
"color": {
"background": "var:preset|color|neutral-50"
"width": "1px"
}
},
"card-footer": {
"blockTypes": [ "core/group" ],
"border": {
"top": {
"color": "var:custom|global|border-color",
"style": "var:custom|global|border-style",
"width": "1px"
}
},
"color": {
"background": "transparent"
}
},
"site-footer": {
"blockTypes": [ "core/group" ],
"border": {
"top": {
"color": "var:custom|global|border-color",
"width": "var:custom|global|border-width"
}
"color": {
"background": "transparent"
}
},
"site-footer": {
"border": {
"top": {
"color": "var:custom|global|border-color",
"width": "var:custom|global|border-width"
}
}
}
Expand Down
139 changes: 64 additions & 75 deletions styles/global/boundaries.json
Original file line number Diff line number Diff line change
Expand Up @@ -443,92 +443,81 @@
"width": "var:custom|global|border-width"
}
}
},
"variations": {
"archive-header": {
"blockTypes": [ "core/group" ],
"border": {
"color": "var:custom|global|border-color",
"style": "var:custom|global|border-style",
"width": "0 0 var(--wp--custom--global--border-width)"
},
"spacing": {
"padding": {
"top": "var:preset|spacing|plus-6",
"bottom": "var:preset|spacing|plus-6"
}
}
},
"variations": {
"archive-header": {
"border": {
"color": "var:custom|global|border-color",
"style": "var:custom|global|border-style",
"width": "0 0 var(--wp--custom--global--border-width)"
},
"spacing": {
"padding": {
"top": "var:preset|spacing|plus-6",
"bottom": "var:preset|spacing|plus-6"
}
}
},
"card": {
"border": {
"color": "var:custom|global|border-color",
"style": "var:custom|global|border-style",
"width": "var:custom|global|border-width"
},
"card": {
"blockTypes": [ "core/group" ],
"border": {
"color": {
"background": "var:preset|color|base"
}
},
"card-footer": {
"border": {
"top": {
"color": "var:custom|global|border-color",
"style": "var:custom|global|border-style",
"width": "var:custom|global|border-width"
},
"color": {
"background": "var:preset|color|base"
}
},
"card-footer": {
"blockTypes": [ "core/group" ],
"border": {
"top": {
"color": "var:custom|global|border-color",
"style": "var:custom|global|border-style",
"width": "var:custom|global|border-width"
}
},
"color": {
"background": "transparent"
}
},
"comment-meta": {
"blockTypes": [ "core/group" ],
"color": {
"text": "var:preset|color|neutral-500"
}
},
"post-byline": {
"blockTypes": [ "core/group" ],
"color": {
"text": "var:preset|color|neutral-500"
}
"color": {
"background": "transparent"
}
},
"comment-meta": {
"color": {
"text": "var:preset|color|neutral-500"
}
},
"post-byline": {
"color": {
"text": "var:preset|color|neutral-500"
}
},
"post-meta": {
"color": {
"text": "var:preset|color|neutral-500"
}
},
"site-footer": {
"color": {
"background": "transparent"
},
"post-meta": {
"blockTypes": [ "core/group" ],
"color": {
"text": "var:preset|color|neutral-500"
"border": {
"top": {
"color": "var:custom|global|border-color",
"style": "var:custom|global|border-style",
"width": "var:custom|global|border-width"
}
},
"site-footer": {
"blockTypes": [
"core/columns",
"core/group"
],
"color": {
"background": "transparent"
},
"border": {
"top": {
"color": "var:custom|global|border-color",
"style": "var:custom|global|border-style",
"width": "var:custom|global|border-width"
}
}
},
"site-header": {
"border": {
"bottom": {
"color": "var:custom|global|border-color",
"style": "var:custom|global|border-style",
"width": "var:custom|global|border-width"
}
},
"site-header": {
"blockTypes": [ "core/group" ],
"border": {
"bottom": {
"color": "var:custom|global|border-color",
"style": "var:custom|global|border-style",
"width": "var:custom|global|border-width"
}
},
"color": {
"background": "transparent"
}
"color": {
"background": "transparent"
}
}
}
Expand Down
54 changes: 25 additions & 29 deletions styles/global/chestnut-rose.json
Original file line number Diff line number Diff line change
Expand Up @@ -429,36 +429,32 @@
"fontSize": "var:preset|font-size|xs",
"lineHeight": "var:custom|line-height|xs"
}
}
},
"variations": {
"comment-meta": {
"typography": {
"fontSize": "var:preset|font-size|xs",
"lineHeight": "var:custom|line-height|xs"
}
},
"variations": {
"comment-meta": {
"blockTypes": [ "core/group" ],
"typography": {
"fontSize": "var:preset|font-size|xs",
"lineHeight": "var:custom|line-height|xs"
}
},
"post-byline": {
"blockTypes": [ "core/group" ],
"typography": {
"fontSize": "var:preset|font-size|xs",
"lineHeight": "var:custom|line-height|xs"
}
},
"post-meta": {
"blockTypes": [ "core/group" ],
"typography": {
"fontSize": "var:preset|font-size|xs",
"lineHeight": "var:custom|line-height|xs"
}
},
"section-1": {
"blockTypes": [ "core/group" ],
"elements": {
"heading": {
"color": {
"text": "currentColor"
}
"post-byline": {
"typography": {
"fontSize": "var:preset|font-size|xs",
"lineHeight": "var:custom|line-height|xs"
}
},
"post-meta": {
"typography": {
"fontSize": "var:preset|font-size|xs",
"lineHeight": "var:custom|line-height|xs"
}
},
"section-1": {
"elements": {
"heading": {
"color": {
"text": "currentColor"
}
}
}
Expand Down
Loading

0 comments on commit 021a32a

Please sign in to comment.