Skip to content
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
26 changes: 18 additions & 8 deletions data/structures/_types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,25 @@ types:
content:
align:
arrangement:
width:
# no inherited default: consuming partials supply their own width fallback
# (hero derives 8, section-title spans the full column) as in v5
width: { default: }
size:
illustration:
image:
justify:
# no inherited default: hero-image centers by default and only applies
# md justification when explicitly set, as in v5
justify: { default: }
caption:
caption-url:
icon:
ratio:
class:
anchor:
mode:
width:
# no inherited default: the global width default (8) is meant for text
# columns and shrinks images; partials fall back to a full column as in v5
width: { default: }
image-overlay:
hook:
instructions:
Expand Down Expand Up @@ -70,8 +76,10 @@ types:
download:
icon:
force:
order:
outline:
# no inherited defaults: downstream partials layer their own (download.yml
# sets outline/order; section context supplies order) as in v5
order: { default: }
outline: { default: }
messages:
- title:
icon:
Expand All @@ -89,9 +97,11 @@ types:
values:
styles:
- ratio:
orientation:
portrait:
width:
# no inherited defaults: per-style overrides fall back to the card-group
# context values (inline/style.html) as in v5
orientation: { default: }
portrait: { default: }
width: { default: }
video:
provider:
account:
Expand Down
26 changes: 18 additions & 8 deletions exampleSite/data/structures/_types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,25 @@ types:
content:
align:
arrangement:
width:
# no inherited default: consuming partials supply their own width fallback
# (hero derives 8, section-title spans the full column) as in v5
width: { default: }
size:
illustration:
image:
justify:
# no inherited default: hero-image centers by default and only applies
# md justification when explicitly set, as in v5
justify: { default: }
caption:
caption-url:
icon:
ratio:
class:
anchor:
mode:
width:
# no inherited default: the global width default (8) is meant for text
# columns and shrinks images; partials fall back to a full column as in v5
width: { default: }
image-overlay:
hook:
instructions:
Expand Down Expand Up @@ -74,8 +80,10 @@ types:
download:
icon:
force:
order:
outline:
# no inherited defaults: downstream partials layer their own (download.yml
# sets outline/order; section context supplies order) as in v5
order: { default: }
outline: { default: }
messages:
- title:
icon:
Expand All @@ -93,9 +101,11 @@ types:
values:
styles:
- ratio:
orientation:
portrait:
width:
# no inherited defaults: per-style overrides fall back to the card-group
# context values (inline/style.html) as in v5
orientation: { default: }
portrait: { default: }
width: { default: }
video:
provider:
account:
Expand Down
32 changes: 9 additions & 23 deletions tests/golden/bookshop.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"align": "start",
"arrangement": "above",
"size": 4,
"title": "Hello",
"width": 8
"title": "Hello"
},
"linkType": "button",
"link_type": "button",
Expand All @@ -40,8 +39,7 @@
"align": "start",
"arrangement": "above",
"size": 4,
"title": "Hello",
"width": 8
"title": "Hello"
},
"linkType": "button",
"showMore": false,
Expand All @@ -51,7 +49,6 @@
"heading.align",
"heading.arrangement",
"heading.size",
"heading.width",
"link_type"
],
"err": true,
Expand All @@ -78,8 +75,7 @@
"align": "start",
"arrangement": "above",
"size": 4,
"title": "Hello",
"width": 8
"title": "Hello"
},
"linkType": "button",
"showMore": false,
Expand All @@ -89,7 +85,6 @@
"heading.align",
"heading.arrangement",
"heading.size",
"heading.width",
"link_type",
"show_more",
"width"
Expand All @@ -113,8 +108,7 @@
"align": "start",
"arrangement": "above",
"size": 4,
"title": "Hello",
"width": 8
"title": "Hello"
},
"linkType": "button",
"link_type": "button",
Expand All @@ -131,8 +125,7 @@
"align": "start",
"arrangement": "above",
"size": 4,
"title": "Hello",
"width": 8
"title": "Hello"
},
"linkType": "link",
"showMore": false,
Expand All @@ -142,7 +135,6 @@
"heading.align",
"heading.arrangement",
"heading.size",
"heading.width",
"show_more",
"width"
],
Expand All @@ -163,8 +155,7 @@
"align": "start",
"arrangement": "above",
"size": 4,
"title": "Hello",
"width": 8
"title": "Hello"
},
"linkType": "link",
"link_type": "link",
Expand All @@ -184,8 +175,7 @@
"align": "start",
"arrangement": "above",
"size": 4,
"title": "Hello",
"width": 8
"title": "Hello"
},
"linkType": "link",
"showMore": true,
Expand All @@ -195,7 +185,6 @@
"heading.align",
"heading.arrangement",
"heading.size",
"heading.width",
"width"
],
"err": false,
Expand All @@ -214,8 +203,7 @@
"align": "start",
"arrangement": "above",
"size": 4,
"title": "Hello",
"width": 8
"title": "Hello"
},
"linkType": "link",
"link_type": "link",
Expand All @@ -232,8 +220,7 @@
"align": "start",
"arrangement": "above",
"size": 4,
"title": "Hello",
"width": 8
"title": "Hello"
},
"linkType": "button",
"showMore": false,
Expand All @@ -243,7 +230,6 @@
"heading.align",
"heading.arrangement",
"heading.size",
"heading.width",
"link_type",
"show_more",
"width"
Expand Down
9 changes: 3 additions & 6 deletions tests/golden/frontmatter.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@
"align": "center",
"arrangement": "above",
"size": 4,
"title": "Hello",
"width": 8
"title": "Hello"
},
"locations": []
},
"defaulted": [
"heading.arrangement",
"heading.size",
"heading.width"
"heading.size"
],
"err": false,
"errmsg": [],
Expand All @@ -28,8 +26,7 @@
"align": "center",
"arrangement": "above",
"size": 4,
"title": "Hello",
"width": 8
"title": "Hello"
},
"locations": [],
"warnmsg": []
Expand Down
2 changes: 0 additions & 2 deletions tests/golden/inittypes.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@
},
"width": {
"comment": "Column width of the element. For embedded elements, the width is relative to the parent's container.",
"default": 8,
"optional": true,
"options": {
"max": 12,
Expand Down Expand Up @@ -245,7 +244,6 @@
},
"width": {
"comment": "Column width of the element. For embedded elements, the width is relative to the parent's container.",
"default": 8,
"optional": true,
"options": {
"max": 12,
Expand Down
Loading
Loading