Skip to content

Commit e9b67eb

Browse files
committed
issue-360/band-body-grid-gap Add back grid settings to default slot (band body), update readme with explicit notes for this section, refine demo file
1 parent e41797e commit e9b67eb

File tree

3 files changed

+39
-15
lines changed

3 files changed

+39
-15
lines changed

elements/pfe-band/README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,35 @@ This container element provides a set of slots in which to render banded content
77
All slots other than `pfe-band--body` are optional. If the slot is not defined, the container tag for it will not be rendered in the template.
88

99
- `pfe-band--header`: This slot renders at the top of the container and generally contains the title, headline, and or subheadline content. Other possible candidates include a set of social sharing links or tags that describe the content below. The recommended tag for this slot is the `header` tag with h-level or p tags contained within it.
10-
- **Default slot**: This is the default slot and contains the bulk of the content in this element. Paragraph text or a grid of cards or images might be rendered in this region. Recommended tag for this slot is the `article` tag. Any content not assigned to a slot will be rendered here.
10+
- **Default slot**: This unnamed slot should contain the bulk of the content in this element. The recommended wrapper within this slot is the `article` tag, but a div could also work to contain text elements like paragraphs. If you are rendering non-text components such as cards or images, no wrapper is necessary, and these items will make use of the grid layout. Any content not assigned to a named slot will be rendered here.
1111
- `pfe-band--footer`: This slot is typically used for calls-to-action or footnotes and is pushed to the bottom of the container. Recommended tags include `pfe-cta` or `footer`.
1212
- `pfe-band--aside`: This slot is for content that should be rendered to the right or left of the default slot on desktop. Asides often contain `pfe-card` or interest forms which provide users a little more information or context for the band.
1313

14+
### Example markup
15+
```
16+
<pfe-band>
17+
<header slot="pfe-band--header">
18+
<h2>Lighter band; no footer</h2>
19+
</header>
20+
21+
<article>
22+
<p>Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata dolor sit amet.</p>
23+
</article>
24+
25+
<pfe-card slot="pfe-band--aside">
26+
<h3 slot="header">Aside: left body bottom</h3>
27+
<p>Ut wisi enim ad minim veniam.</p>
28+
</pfe-card>
29+
30+
<footer slot="pfe-band--footer" class="custom-footnote">
31+
<pfe-cta slot="footer" priority="tertiary">
32+
<a href="#">Learn more</a>
33+
</pfe-cta>
34+
</footer>
35+
</pfe-band>
36+
```
37+
38+
1439
## Attributes
1540

1641
<style>

elements/pfe-band/demo/index.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,12 @@ <h3 slot="header">Aside: right body bottom</h3>
107107
<h2>Lighter band; no footer</h2>
108108
<p class="custom-band-summary">Header region, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>
109109
</header>
110-
<p>Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
111-
<pfe-cta priority="tertiary">
112-
<a href="#">Learn more</a>
113-
</pfe-cta>
110+
<article>
111+
<p>Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
112+
<pfe-cta priority="tertiary">
113+
<a href="#">Learn more</a>
114+
</pfe-cta>
115+
</article>
114116
<pfe-card color="complement" slot="pfe-band--aside">
115117
<h3 slot="header">Aside: left body bottom</h3>
116118
<p>Ut wisi enim ad minim veniam.</p>
@@ -239,27 +241,25 @@ <h3 slot="header">Aside: right body bottom</h3>
239241
<h2>Layout variables; no aside</h2>
240242
<p class="custom-band-summary">Header region, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>
241243
</header>
242-
<div class="pfe-l-grid pfe-m-gutters">
243-
244-
<pfe-card class="pfe-l-grid__item pfe-m-6-col pfe-m-3-col-on-md" color="dark">
244+
<pfe-card color="dark">
245245
<p>Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>
246246
<pfe-cta priority="tertiary" slot="footer">
247247
<a href="#">Learn more</a>
248248
</pfe-cta>
249249
</pfe-card>
250-
<pfe-card class="pfe-l-grid__item pfe-m-6-col pfe-m-3-col-on-md" color="dark">
250+
<pfe-card color="dark">
251251
<p>At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
252252
<pfe-cta priority="tertiary" slot="footer">
253253
<a href="#">Learn more</a>
254254
</pfe-cta>
255255
</pfe-card>
256-
<pfe-card class="pfe-l-grid__item pfe-m-6-col pfe-m-3-col-on-md" color="dark">
256+
<pfe-card color="dark">
257257
<p>Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>
258258
<pfe-cta priority="tertiary" slot="footer">
259259
<a href="#">Learn more</a>
260260
</pfe-cta>
261261
</pfe-card>
262-
<pfe-card class="pfe-l-grid__item pfe-m-6-col pfe-m-3-col-on-md" color="dark">
262+
<pfe-card color="dark">
263263
<p>At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
264264
<pfe-cta priority="tertiary" slot="footer">
265265
<a href="#">Learn more</a>

elements/pfe-band/src/pfe-band.scss

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,8 @@ $LOCAL: band;
9999
--pfe-band--Padding: calc(#{pfe-local(Padding--vertical)} / 4) #{pfe-local(Padding--horizontal)};
100100
}
101101

102-
.pfe-band__body {
103-
display: block;
104-
margin-bottom: #{pfe-local(gutter--vertical)};
105-
}
106102
.pfe-band__header,
103+
.pfe-band__body,
107104
.pfe-band__aside,
108105
.pfe-band__footer {
109106
display: flex;
@@ -114,6 +111,7 @@ $LOCAL: band;
114111

115112
@supports (display: grid) {
116113
.pfe-band__header,
114+
.pfe-band__body,
117115
.pfe-band__aside,
118116
.pfe-band__footer {
119117
display: grid;
@@ -135,6 +133,7 @@ $LOCAL: band;
135133
}
136134
.pfe-band__body {
137135
grid-area: body;
136+
grid-template-columns: var(--pfe-band__body--layout);
138137
margin-bottom: 0;
139138
}
140139
}

0 commit comments

Comments
 (0)