@repobit/dex-system-design 2.3.2 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/package.json +2 -2
  3. package/schemas/component-manifest.json +62 -4
  4. package/src/components/anchor/anchor.stories.js +0 -3
  5. package/src/components/audience-card/audience-card.css.js +10 -0
  6. package/src/components/audience-card/audience-card.js +2 -2
  7. package/src/components/awards/awards-spotlight.css.js +10 -0
  8. package/src/components/awards/awards-spotlight.js +1 -1
  9. package/src/components/badge/badge.css.js +7 -1
  10. package/src/components/bento-grid/bento-grid.css.js +4 -0
  11. package/src/components/bento-grid/bento-grid.js +13 -0
  12. package/src/components/bento-grid/bento-grid.stories.js +1 -1
  13. package/src/components/bento-grid/bento-item.css.js +32 -3
  14. package/src/components/bento-grid/bento-item.js +3 -3
  15. package/src/components/button/button.css.js +36 -1
  16. package/src/components/button/button.js +13 -6
  17. package/src/components/button/button.stories.js +4 -4
  18. package/src/components/features-tab/features-tab.js +2 -1
  19. package/src/components/features-tab/features-tab.stories.js +2 -2
  20. package/src/components/grid/grid.css.js +6 -1
  21. package/src/components/grid/grid.js +10 -1
  22. package/src/components/grid/grid.stories.js +6 -1
  23. package/src/components/header/header-code.stories.js +2 -5
  24. package/src/components/header/header.js +4 -4
  25. package/src/components/header/header.stories.js +3 -3
  26. package/src/components/hero/hero.css.js +121 -18
  27. package/src/components/hero/hero.js +5 -2
  28. package/src/components/hero/hero.stories.js +5 -4
  29. package/src/components/logo-marquee/logo-marquee.js +3 -3
  30. package/src/components/logo-marquee/logo-marquee.stories.js +6 -6
  31. package/src/components/partner-banner/partner-banner.css.js +96 -14
  32. package/src/components/partner-banner/partner-banner.js +32 -16
  33. package/src/components/post-card/post-card.css.js +14 -0
  34. package/src/components/post-card/post-card.js +8 -8
  35. package/src/components/pricing-cards/pricing-card-actions.js +0 -1
  36. package/src/components/pricing-cards/pricing-card.js +0 -4
  37. package/src/components/section-header/section-header.css.js +11 -0
  38. package/src/components/section-header/section-header.js +3 -3
  39. package/src/components/stat/stat-highlight.js +3 -3
  40. package/src/components/stat/stat.css.js +21 -3
  41. package/src/components/stat/stat.stories.js +2 -2
  42. package/src/tokens/tokens.css +4 -2
  43. package/src/tokens/tokens.js +4 -2
@@ -257,14 +257,16 @@ class Header extends LitElement {
257
257
  <span class="bd-price-zone-final" data-store-render data-store-price="discounted||full"></span>
258
258
 
259
259
  <div class="bd-cta">
260
- <!-- size="lg", and no font-size override. Header / v2 draws both
260
+ <!-- No size: the button's responsive default, lg from 992px and md
261
+ below it, and no font-size override. Header / v2 draws both
261
262
  CTAs at 16/32 padding with an 18px label in an 8px-radius box,
262
263
  and --button-large-* is that set exactly: spacing-16/32,
263
264
  fontSize-lg, radius-lg. These were size="md" (12/24, 16px,
264
265
  radius-md) with font-size="lg" bolted on top, so the label was
265
266
  the large step's and the box was the medium step's -- 18px type
266
267
  in a box padded for 16px type. Dropping the override puts the
267
- whole control back on one answer.
268
+ whole control back on one answer. Narrower than desktop the
269
+ CTAs drop to md, the band every website CTA uses there.
268
270
 
269
271
  THE LABELS come from cta-label and cta-secondary-label as of
270
272
  2026-09-17, defaulting to the strings this component always
@@ -293,7 +295,6 @@ class Header extends LitElement {
293
295
  never touches the secondary. -->
294
296
  <bd-button-link
295
297
  variant="accent"
296
- size="lg"
297
298
  part="buy-button"
298
299
  buyLink
299
300
  >${this.ctaLabel}</bd-button-link
@@ -301,7 +302,6 @@ class Header extends LitElement {
301
302
  <bd-button-link
302
303
  href="${this.ctaSecondaryHref}"
303
304
  variant="tertiary"
304
- size="lg"
305
305
  >${this.ctaSecondaryLabel}</bd-button-link
306
306
  >
307
307
  </div>
@@ -67,7 +67,7 @@ won drops to 48 — where \`heading-h1\` already lives. Measured, in render orde
67
67
  | discount | \`bd-badge tone="success" variant="fill" size="lg"\` | 14px / 500, white on \`rgb(14 133 50)\` |
68
68
  | final price | \`heading-h2\` | 36px / 700 / 45px |
69
69
  | disclaimers | \`bd-p variant="xsmall"\`, muted | 12px / 400 / 17.4px |
70
- | both CTAs | \`size="lg"\` | 16/32 padding, 18px label, 8px radius |
70
+ | both CTAs | no \`size\` (responsive) | from 992px: 16/32 padding, 18px label, 8px radius; below: 12/24, 16px, 6px |
71
71
 
72
72
  ### The heading structure: one h1, and the eyebrow is not a heading
73
73
 
@@ -980,10 +980,10 @@ way: the page owns the outline, so the page gets the say.`
980
980
  <span class="bd-price-zone-final">${FIGMA.finalPrice}</span>
981
981
 
982
982
  <div class="bd-cta">
983
- <bd-button-link label=${FIGMA.ctaPrimary} variant="accent" size="lg">
983
+ <bd-button-link label=${FIGMA.ctaPrimary} variant="accent">
984
984
  ${FIGMA.ctaPrimary}
985
985
  </bd-button-link>
986
- <bd-button-link label=${FIGMA.ctaSecondary} variant="tertiary" size="lg">
986
+ <bd-button-link label=${FIGMA.ctaSecondary} variant="tertiary">
987
987
  ${FIGMA.ctaSecondary}
988
988
  </bd-button-link>
989
989
  </div>
@@ -2,7 +2,7 @@ import { css, unsafeCSS } from "lit";
2
2
  import { above } from "../shared/token-scales.js";
3
3
 
4
4
  /* Mobile first, in the three frames the Figma Hero draws.
5
- below md the video on top, the copy centred under it and rising 112 into
5
+ below md the video on top, the copy centred under it and rising 80 into
6
6
  its fade; the cards follow the band on the page
7
7
  md to lg the same, the copy rising 64
8
8
  lg and up the video fills the band, the copy sits left over it, and the
@@ -42,22 +42,25 @@ export const heroCSS = css`
42
42
  }
43
43
 
44
44
  /* Slotted art (bd-motion-art) is square and sizes itself from its own
45
- width, so the stage gives it one, centred on the stage. The sphere fills
46
- 78% of the art, and the phone and tablet frames draw it about 320 and
47
- 340 across in the 360 stage: 112% of the stage's height on a phone, 120%
48
- from md, the glow running off the stage's edges. Margins, not a
49
- translate, so it centres in RTL too. */
45
+ width, so the stage gives it one. The sphere fills 78% of the art. The
46
+ phone frame draws it about 300 across, centred 156 down the 360 stage,
47
+ so the B sits clear above the copy rising into the stage: 108% of the
48
+ stage's height, raised 7% of it. The tablet frame draws it about 340
49
+ across and centred (120% from md, below). The glow runs off the stage's
50
+ edges. Margins, not a translate, so it centres in RTL too. */
50
51
  ::slotted([slot="media"]) {
51
52
  position: absolute;
52
53
  inset-block-start: 50%;
53
54
  inset-inline-start: 50%;
54
- width: 112cqh;
55
- margin-block-start: -56cqh;
56
- margin-inline-start: -56cqh;
55
+ width: 108cqh;
56
+ margin-block-start: -61cqh;
57
+ margin-inline-start: -54cqh;
57
58
  }
58
59
 
59
- /* The video fades into the band so the copy has a solid ground under it:
60
- the brand at 0, 60, 95 and 100%. No token: four stops of a gradient,
60
+ /* The frames' video-fade: the video fades into the band so the copy has a
61
+ solid ground under it, the brand at 0, 60, 95 and 100% at 0, 45, 80 and
62
+ 100% of the fade. The phone and tablet frames draw it 230 tall at the
63
+ foot of the 360 stage, 64% of it. No token: four stops of a gradient,
61
64
  mixed from the brand surface so a partner brand fades into its own. */
62
65
  .fade {
63
66
  position: absolute;
@@ -84,7 +87,7 @@ export const heroCSS = css`
84
87
  flex-direction: column;
85
88
  align-items: center;
86
89
  gap: var(--spacing-8);
87
- margin-block-start: calc(-1 * var(--spacing-112));
90
+ margin-block-start: calc(-1 * var(--spacing-80));
88
91
  text-align: center;
89
92
  color: var(--color-brand-on-fill);
90
93
  }
@@ -146,6 +149,12 @@ export const heroCSS = css`
146
149
  display: none;
147
150
  }
148
151
 
152
+ /* The glow under the band: only the desktop frame draws it, so it waits
153
+ for lg (below lg the cards sit on the band's own ground). */
154
+ .glow {
155
+ display: none;
156
+ }
157
+
149
158
  @media ${unsafeCSS(above("md"))} {
150
159
  .copy {
151
160
  margin-block-start: calc(-1 * var(--spacing-64));
@@ -201,17 +210,41 @@ export const heroCSS = css`
201
210
  object-position: var(--bd-hero-media-position-lg, 50% 50%);
202
211
  }
203
212
 
204
- /* the art sits right of the copy, where the poster draws the sphere,
205
- as tall as the band */
213
+ /* The art sits right of the copy, as tall as the band and raised 6% of
214
+ it, with the sphere ending on the page column's content edge, as the
215
+ desktop frame draws it, at every width. The stage is the band's full
216
+ width, so the edge is worked out from the column's own steps
217
+ (--bd-hero-column, set per breakpoint below, and --grid-padding-lg);
218
+ the sphere ends 11% short of the art's own edge. */
219
+ .stage {
220
+ --bd-hero-column: var(--grid-container-max-lg);
221
+ }
222
+
206
223
  ::slotted([slot="media"]) {
207
- inset-inline-start: var(--bd-hero-art-position-lg, 74%);
224
+ inset-inline-start: auto;
225
+ inset-inline-end: calc((100% - var(--bd-hero-column)) / 2 + var(--grid-padding-lg) - 11cqh);
208
226
  width: 100cqh;
209
- margin-block-start: -50cqh;
210
- margin-inline-start: -50cqh;
227
+ margin-block-start: -56cqh;
228
+ margin-inline-start: 0;
211
229
  }
212
230
 
231
+ /* The desktop frame's video-fade: 246 tall, ending 102 above the band's
232
+ lower edge, so it lies over the lower half of the sphere, with solid
233
+ brand under it to the band's edge (behind the rising cards). The same
234
+ stops, laid over the first 246 of a 348 box: 246 / 348 = 70.7%, and
235
+ 45 and 80% of that. */
213
236
  .fade {
214
- height: 40%;
237
+ /* no token: the frame's fade and its reach; the dimension scale stops
238
+ at 64 */
239
+ height: 348px;
240
+ /* no token: a gradient's stops */
241
+ background: linear-gradient(
242
+ to bottom,
243
+ color-mix(in srgb, var(--color-surface-brand) 0%, transparent) 0%,
244
+ color-mix(in srgb, var(--color-surface-brand) 60%, transparent) 31.8%,
245
+ color-mix(in srgb, var(--color-surface-brand) 95%, transparent) 56.6%,
246
+ var(--color-surface-brand) 70.7%
247
+ );
215
248
  }
216
249
 
217
250
  .copy {
@@ -250,6 +283,66 @@ export const heroCSS = css`
250
283
  padding-block-end: 0;
251
284
  background: none;
252
285
  }
286
+
287
+ /* The desktop frame's glow (Vector 3): a brand shape at 10%, blurred
288
+ 200 in Figma (a Gaussian of 100), 1550 by 666, centred on the page
289
+ and starting 434 above the band's lower edge, so it spills out under
290
+ the band, behind the cards and on past them. The element sits between
291
+ the band and the cards and takes no room; its ::before is the shape,
292
+ clipped to the frame's own path, and the element blurs it. Behind the
293
+ band (the root isolates it), so a partner brand's band keeps its own
294
+ hue and the haze shows only where the band ends. The root clips it
295
+ sideways, where it is wider than the page. */
296
+ .root {
297
+ isolation: isolate;
298
+ overflow-x: clip;
299
+ }
300
+
301
+ .glow {
302
+ display: block;
303
+ position: relative;
304
+ z-index: var(--z-below);
305
+ height: 0;
306
+ /* no token: the frame's layer blur */
307
+ filter: blur(100px);
308
+ }
309
+
310
+ .glow::before {
311
+ content: "";
312
+ position: absolute;
313
+ inset-inline-start: 50%;
314
+ /* no token: the shape's place and size in the desktop frame; the
315
+ dimension scale stops at 64 */
316
+ inset-block-start: -434px;
317
+ /* no token: the shape's width in the frame */
318
+ width: 1550px;
319
+ /* no token: the shape's height in the frame */
320
+ height: 666px;
321
+ margin-inline-start: -775px;
322
+ background: color-mix(in srgb, var(--color-surface-brand) 10%, transparent);
323
+ /* no token: the frame's path */
324
+ clip-path: path("M1006 130C873.7 -68.8 419.4 3.8 208.7 65C-292.1 216 208.7 594.4 659.6 656.8C1110.5 719.1 1600.4 449.6 1545.8 334.6C1491.2 219.5 1171.4 378.5 1006 130Z");
325
+ pointer-events: none;
326
+ }
327
+ }
328
+
329
+ /* the column's cap at each step from lg, for the art's edge above */
330
+ @media ${unsafeCSS(above("xl"))} {
331
+ .stage {
332
+ --bd-hero-column: var(--grid-container-max-xl);
333
+ }
334
+ }
335
+
336
+ @media ${unsafeCSS(above("xxl"))} {
337
+ .stage {
338
+ --bd-hero-column: var(--grid-container-max-xxl);
339
+ }
340
+ }
341
+
342
+ @media ${unsafeCSS(above("xxxl"))} {
343
+ .stage {
344
+ --bd-hero-column: var(--grid-container-max-xxxl);
345
+ }
253
346
  }
254
347
 
255
348
  @media (prefers-reduced-motion: reduce) {
@@ -257,4 +350,14 @@ export const heroCSS = css`
257
350
  display: none;
258
351
  }
259
352
  }
353
+
354
+ /* A newline in the text is a line break, so a page can keep the breaks its
355
+ copy was written with (a <br> in the authored eyebrow, heading or lead
356
+ arrives as a newline in the property). Text only: nothing here renders
357
+ HTML. */
358
+ .eyebrow,
359
+ .heading,
360
+ .lead {
361
+ white-space: pre-line;
362
+ }
260
363
  `;
@@ -11,8 +11,10 @@ import { heroCSS } from "./hero.css.js";
11
11
  * the brand at the bottom, an eyebrow, the page's one h1 and a lead. Drawn in
12
12
  * the foundation Figma file as Hero.
13
13
  *
14
- * Desktop sets the copy left over the video; below lg the video sits on top
15
- * and the copy is centred under it. Slot `cards` takes the audience cards:
14
+ * Desktop sets the copy left over the video, and a faint brand haze spills
15
+ * out under the band, behind the cards (the desktop frame's glow); below lg
16
+ * the video sits on top and the copy is centred under it.
17
+ * Slot `cards` takes the audience cards:
16
18
  * from lg they overlap the band's lower edge, below it they follow the band
17
19
  * on the same brand ground, as the phone and tablet frames draw them.
18
20
  *
@@ -155,6 +157,7 @@ export class Hero extends LitElement {
155
157
  </div>
156
158
  </div>
157
159
  </div>
160
+ <div class="glow" aria-hidden="true"></div>
158
161
  <div class="cards-band" ?hidden=${!this._hasCards}>
159
162
  <div class="bd-ensemble cards">
160
163
  <slot name="cards" @slotchange=${this._onCardsSlot}></slot>
@@ -22,7 +22,7 @@ Drawn in the foundation Figma file as **Hero**. It sells nothing and carries no
22
22
  CTA, which is what separates it from \`bd-header\`, the product hero.
23
23
 
24
24
  \`\`\`html
25
- <bd-hero eyebrow="25 Years. Trusted. Always." heading="Cybersecurity for the AI Era."
25
+ <bd-hero eyebrow="25 Years.&#10;Trusted. Always." heading="Cybersecurity for the AI Era."
26
26
  lead="Bitdefender protects consumers, …">
27
27
  <bd-motion-art slot="media" object="brand-surface"></bd-motion-art>
28
28
  <bd-grid slot="cards" cols="1" cols-lg="3" gap="md">
@@ -35,13 +35,13 @@ CTA, which is what separates it from \`bd-header\`, the product hero.
35
35
  |---|---|
36
36
  | below \`md\` | video on top (360), copy centred under it, rising into the fade |
37
37
  | \`md\` to \`lg\` | the same, the eyebrow at h3 and the h1 at display-md |
38
- | \`lg\` and up | the video fills the band, the copy sits left on a 588 measure, the h1 at display-xl, and the \`cards\` slot rises 128 into the band's lower edge |
38
+ | \`lg\` and up | the video fills the band, the copy sits left on a 588 measure, the h1 at display-xl, and the \`cards\` slot rises 128 into the band's lower edge; a faint brand haze spills out under the band, behind the cards, as the desktop frame's glow draws it |
39
39
 
40
40
  ### Slots
41
41
 
42
42
  | Slot | Description |
43
43
  |---|---|
44
- | \`media\` | Animated art in the video's place: \`<bd-motion-art object="brand-surface">\`. It replaces \`video-src\` and \`poster\`, and sits square and centred: 112% of the 360 stage's height on a phone and 120% from \`md\`, so the sphere fills the stage as the Figma phone and tablet frames draw it; from \`lg\` as tall as the band, centred on 74% of it (\`--bd-hero-art-position-lg\` moves it) |
44
+ | \`media\` | Animated art in the video's place: \`<bd-motion-art object="brand-surface">\`. It replaces \`video-src\` and \`poster\`, and sits square and centred: 112% of the 360 stage's height on a phone and 120% from \`md\`, so the sphere fills the stage as the Figma phone and tablet frames draw it; from \`lg\` as tall as the band and raised 6% of it, the sphere ending on the page column's content edge at every width |
45
45
  | \`cards\` | The audience cards |
46
46
 
47
47
  ### Properties
@@ -95,7 +95,8 @@ const cards = html`
95
95
  `;
96
96
 
97
97
  const defaults = {
98
- eyebrow : "25 Years. Trusted. Always.",
98
+ // a newline is a line break, as every frame sets the eyebrow on two lines
99
+ eyebrow : "25 Years.\nTrusted. Always.",
99
100
  heading : "Cybersecurity for the AI Era.",
100
101
  lead : "Bitdefender protects consumers, small businesses, and enterprises with cybersecurity powered by world-class threat intelligence and more than two decades of security innovation. Its technology is independently tested and proven.",
101
102
  videoSrc: "",
@@ -1,7 +1,7 @@
1
1
  import { LitElement, html } from "lit";
2
2
  import { tokens } from "../../tokens/tokens.js";
3
- import { spacing } from "../shared/token-scales.js";
4
3
  import { ensembleCSS } from "../shared/ensemble.css.js";
4
+ import { spacing } from "../shared/token-scales.js";
5
5
  import { logoMarqueeCSS } from "./logo-marquee.css.js";
6
6
 
7
7
  /**
@@ -34,8 +34,8 @@ export class LogoMarquee extends LitElement {
34
34
  constructor() {
35
35
  super();
36
36
  this.label = "";
37
- // seconds for one copy to pass: 18 for the partners, 10 for the awards
38
- this.duration = 18;
37
+ // seconds for one copy to pass: 35 for the partners and the awards alike
38
+ this.duration = 35;
39
39
  // a step on the spacing scale, between two logos
40
40
  this.gap = "48";
41
41
  this.paused = false;
@@ -17,7 +17,7 @@ homepage's trusted line and the award strip under Proven. Drawn in the
17
17
  foundation Figma file as **Logo marquee**.
18
18
 
19
19
  \`\`\`html
20
- <bd-logo-marquee label="Trusted by" duration="18" gap="48">
20
+ <bd-logo-marquee label="Trusted by" duration="35" gap="48">
21
21
  <img src="/ferrari.svg" alt="Ferrari" width="101" height="21">
22
22
  <img src="/netgear.svg" alt="NETGEAR" width="132" height="19">
23
23
  </bd-logo-marquee>
@@ -33,7 +33,7 @@ needs and moves the track by one copy, so the loop has no seam. The copies are
33
33
  | Property | Type | Default | Description |
34
34
  |---|---|---|---|
35
35
  | \`label\` | String | \`""\` | Names the region, in the page's language |
36
- | \`duration\` | Number | \`18\` | Seconds for one copy of the set to pass (18 partners, 10 awards) |
36
+ | \`duration\` | Number | \`35\` | Seconds for one copy of the set to pass (35 for partners and awards) |
37
37
  | \`gap\` | String | \`"48"\` | A spacing step between two logos (48 partners, 24 awards) |
38
38
  | \`paused\` | Boolean | \`false\` | Stopped; a page sets it |
39
39
 
@@ -100,24 +100,24 @@ const render = ({ label, duration, gap, paused, content }) => html`
100
100
 
101
101
  export const Partners = {
102
102
  name: "Partners (trusted line)",
103
- args: { label: "Trusted by", duration: 18, gap: "48", paused: false, content: "partners" },
103
+ args: { label: "Trusted by", duration: 35, gap: "48", paused: false, content: "partners" },
104
104
  render
105
105
  };
106
106
 
107
107
  export const Awards = {
108
108
  name: "Awards (under Proven)",
109
- args: { label: "Awards", duration: 10, gap: "24", paused: false, content: "awards" },
109
+ args: { label: "Awards", duration: 35, gap: "24", paused: false, content: "awards" },
110
110
  render
111
111
  };
112
112
 
113
113
  export const Paused = {
114
- args: { label: "Trusted by", duration: 18, gap: "48", paused: true, content: "partners" },
114
+ args: { label: "Trusted by", duration: 35, gap: "48", paused: true, content: "partners" },
115
115
  render
116
116
  };
117
117
 
118
118
  export const Mobile = {
119
119
  name : "Mobile (375px)",
120
- args : { label: "Trusted by", duration: 18, gap: "48", paused: false, content: "partners" },
120
+ args : { label: "Trusted by", duration: 35, gap: "48", paused: false, content: "partners" },
121
121
  render,
122
122
  parameters: { viewport: { defaultViewport: "mobile1" } }
123
123
  };
@@ -2,7 +2,8 @@ import { css, unsafeCSS } from "lit";
2
2
  import { above } from "../shared/token-scales.js";
3
3
 
4
4
  /* Mobile first, in the Figma Partner banner's three frames.
5
- below md the photo (260), then the card as a solid brand band under it
5
+ below md the photo (260), then the card as a solid brand band under it,
6
+ edge to edge, its copy on the page column
6
7
  md to lg the photo (320), the card rising 64 over its lower edge
7
8
  lg and up the photo (600), the card rising 128, in two columns
8
9
  Everything on the card is in the brand's own ink, --color-brand-on-fill. */
@@ -18,23 +19,32 @@ export const partnerBannerCSS = css`
18
19
  overflow: hidden;
19
20
  }
20
21
 
22
+ /* Cropped from the foot, never the head. Past about 1900px the 600 band is
23
+ wider than the photo's own ratio, so cover crops it vertically, and a
24
+ centred crop took the top off the Ferrari helmet and its Bitdefender
25
+ mark from 2048 up. The card rises over the photo's lower edge anyway,
26
+ so the foot is the part a crop can spend. An author can still set
27
+ object-position on the img for a photo whose subject sits lower. */
21
28
  ::slotted([slot="photo"]) {
22
29
  display: block;
23
30
  width: 100%;
24
31
  height: 100%;
25
32
  object-fit: cover;
33
+ object-position: center top;
26
34
  }
27
35
 
28
- /* below md the card is a band, so the column gives up its gutter */
29
- .column {
30
- --bd-ensemble-inline-padding: 0;
36
+ /* Below md the card is a band: the brand runs edge to edge behind the
37
+ column, and the copy keeps the column's edges, 32 from the band's top
38
+ and foot as the phone frame draws it. */
39
+ .band {
40
+ background: var(--color-surface-brand);
31
41
  }
32
42
 
33
43
  .card {
34
44
  display: flex;
35
45
  flex-direction: column;
36
46
  gap: var(--spacing-24);
37
- padding: var(--spacing-24);
47
+ padding-block: var(--spacing-32);
38
48
  background: var(--color-surface-brand);
39
49
  color: var(--color-brand-on-fill);
40
50
  }
@@ -94,10 +104,13 @@ export const partnerBannerCSS = css`
94
104
  letter-spacing: var(--typography-body-regular-letterSpacing);
95
105
  }
96
106
 
107
+ /* on a phone the CTAs stack, each the card's width (the banner sets their
108
+ fullwidth), 22 apart as the phone frame draws them */
97
109
  .actions {
98
110
  display: flex;
99
- flex-wrap: wrap;
100
- gap: var(--spacing-16);
111
+ flex-direction: column;
112
+ align-self: stretch;
113
+ gap: var(--spacing-22);
101
114
  }
102
115
 
103
116
  @media ${unsafeCSS(above("md"))} {
@@ -106,8 +119,11 @@ export const partnerBannerCSS = css`
106
119
  height: 320px;
107
120
  }
108
121
 
122
+ .band {
123
+ background: none;
124
+ }
125
+
109
126
  .column {
110
- --bd-ensemble-inline-padding: initial;
111
127
  position: relative;
112
128
  margin-block-start: calc(-1 * var(--spacing-64));
113
129
  }
@@ -123,12 +139,36 @@ export const partnerBannerCSS = css`
123
139
  border-radius: var(--shape-radius-3xl);
124
140
  background: linear-gradient(
125
141
  to bottom,
126
- color-mix(in srgb, var(--color-surface-brand) 75%, transparent) 0%,
127
- var(--color-surface-brand) 55%
142
+ color-mix(in srgb, var(--color-surface-brand) 5%, transparent) 0%,
143
+ var(--color-surface-brand) 35%
128
144
  );
129
145
  backdrop-filter: blur(29px);
130
146
  }
131
147
 
148
+ /* A row as wide as its labels, never wider than the column. While they
149
+ fit there is no free space, so nothing grows and each CTA keeps its
150
+ label's width, as the frames draw them; once one wraps the row is the
151
+ column's width and a CTA alone on its line grows to fill it, instead
152
+ of a short button stranded beside empty space. fit-content rather
153
+ than max-content: from lg the row sits in the detail column's own
154
+ content-sized track, and a max-content box would size that track to
155
+ the unwrapped row and run past the card. */
156
+ .actions {
157
+ flex-direction: row;
158
+ flex-wrap: wrap;
159
+ align-self: auto;
160
+ width: fit-content;
161
+ max-width: 100%;
162
+ gap: var(--spacing-16);
163
+ }
164
+
165
+ /* fullwidth (set by the banner) makes the host a 100% block; auto hands
166
+ the width back to the flex line */
167
+ ::slotted([slot="actions"]) {
168
+ flex: 1 1 auto;
169
+ width: auto;
170
+ }
171
+
132
172
  .lead {
133
173
  font-size: var(--typography-body-large-fontSize);
134
174
  font-weight: var(--typography-body-large-fontWeight);
@@ -147,16 +187,58 @@ export const partnerBannerCSS = css`
147
187
  margin-block-start: calc(-1 * var(--spacing-128));
148
188
  }
149
189
 
190
+ /* Two columns on three shared rows, as the desktop frame lines them up:
191
+ the lockup and the quote share the first, so the heading and the lead
192
+ start on one line under the taller of the two, 16 below it; the
193
+ actions take the third, under the lead. Each column is a subgrid of
194
+ the card's rows (its row gap normal, so the card's), and the heading
195
+ runs on through the third. */
150
196
  .card {
151
- flex-direction: row;
152
- align-items: center;
153
- gap: var(--spacing-64);
197
+ display: grid;
198
+ grid-template-columns: 1fr 1fr;
199
+ grid-template-rows: auto auto 1fr;
200
+ column-gap: var(--spacing-64);
201
+ row-gap: var(--spacing-16);
154
202
  padding: var(--spacing-64);
155
203
  }
156
204
 
157
205
  .intro,
158
206
  .detail {
159
- flex: 1 1 0;
207
+ display: grid;
208
+ grid-row: span 3;
209
+ grid-template-rows: subgrid;
210
+ row-gap: normal;
211
+ }
212
+
213
+ .lockup,
214
+ .quote {
215
+ grid-row: 1;
216
+ }
217
+
218
+ .heading {
219
+ grid-row: 2 / span 2;
220
+ }
221
+
222
+ .lead {
223
+ grid-row: 2;
160
224
  }
225
+
226
+ /* the frame sets the actions 24 under the lead: the row gap and 8 more */
227
+ .actions {
228
+ grid-row: 3;
229
+ margin-block-start: var(--spacing-8);
230
+ }
231
+ }
232
+
233
+ /* A newline in the text is a line break, so a page can keep the breaks its
234
+ copy was written with (a <br> in the authored eyebrow, heading or lead
235
+ arrives as a newline in the property). Text only: nothing here renders
236
+ HTML. The rule sits on a span around the text, not on bd-h,
237
+ whose own template could hold newlines that would break too. */
238
+ .text,
239
+ blockquote,
240
+ figcaption,
241
+ .lead {
242
+ white-space: pre-line;
161
243
  }
162
244
  `;
@@ -16,7 +16,9 @@ import { partnerBannerCSS } from "./partner-banner.css.js";
16
16
  * Slots: `photo` (an <img> or <picture>, cover-fitted), `lockup` (the partner
17
17
  * mark, drawn in the brand's ink), `actions` (white and outline-white
18
18
  * bd-button-links). Below md the card stops overlapping and becomes a solid
19
- * band under the photo.
19
+ * band under the photo, edge to edge, with the CTAs stacked at its full
20
+ * width, as the phone frame draws them. From md they sit in a row, and one
21
+ * that wraps grows to the row's width rather than keeping its own.
20
22
  */
21
23
  export class PartnerBanner extends LitElement {
22
24
  static properties = {
@@ -38,25 +40,39 @@ export class PartnerBanner extends LitElement {
38
40
  this.as = "h2";
39
41
  }
40
42
 
43
+ /* A bd-button-link fills its own box only through its fullwidth attribute,
44
+ so the banner sets it on every CTA at every width and leaves the box's
45
+ width to partner-banner.css.js: the column's width on a phone, and from
46
+ md the label's width until the row wraps, then the row's. That decides on
47
+ the rendered labels, so a longer translation wraps and grows where the
48
+ English fits on one line -- no breakpoint could know where that is. */
49
+ _onActionsSlot(e) {
50
+ for (const el of e.target.assignedElements({ flatten: true })) {
51
+ if ("fullWidth" in el) el.setAttribute("fullwidth", "");
52
+ }
53
+ }
54
+
41
55
  render() {
42
56
  return html`
43
57
  <section class="root">
44
58
  <div class="photo"><slot name="photo"></slot></div>
45
- <div class="bd-ensemble column">
46
- <div class="card">
47
- <div class="intro">
48
- <div class="lockup"><slot name="lockup"></slot></div>
49
- <bd-h as="${this.as}" visual-level="h2" color="on-brand" class="heading">${this.heading}</bd-h>
50
- </div>
51
- <div class="detail">
52
- ${this.quote
53
- ? html`<figure class="quote">
54
- <blockquote>${this.quote}</blockquote>
55
- ${this.attribution ? html`<figcaption>${this.attribution}</figcaption>` : nothing}
56
- </figure>`
57
- : nothing}
58
- ${this.lead ? html`<p class="lead">${this.lead}</p>` : nothing}
59
- <div class="actions"><slot name="actions"></slot></div>
59
+ <div class="band">
60
+ <div class="bd-ensemble column">
61
+ <div class="card">
62
+ <div class="intro">
63
+ <div class="lockup"><slot name="lockup"></slot></div>
64
+ <bd-h as="${this.as}" visual-level="h2" color="on-brand" class="heading"><span class="text">${this.heading}</span></bd-h>
65
+ </div>
66
+ <div class="detail">
67
+ ${this.quote
68
+ ? html`<figure class="quote">
69
+ <blockquote>${this.quote}</blockquote>
70
+ ${this.attribution ? html`<figcaption>${this.attribution}</figcaption>` : nothing}
71
+ </figure>`
72
+ : nothing}
73
+ ${this.lead ? html`<p class="lead">${this.lead}</p>` : nothing}
74
+ <div class="actions"><slot name="actions" @slotchange=${this._onActionsSlot}></slot></div>
75
+ </div>
60
76
  </div>
61
77
  </div>
62
78
  </div>
@@ -39,10 +39,16 @@ export const postCardCSS = css`
39
39
  object-fit: cover;
40
40
  }
41
41
 
42
+ /* The badge is the post's feed or category, and a feed's channel title can
43
+ be longer than the cover is wide -- "Business Insights Cybersecurity Blog
44
+ by Bitdefender" ran off the card between md and xl. It keeps the cover's
45
+ inset on both sides and wraps inside it instead. */
42
46
  .badge {
43
47
  position: absolute;
44
48
  inset-block-start: var(--spacing-20);
45
49
  inset-inline-start: var(--spacing-24);
50
+ max-width: calc(100% - 2 * var(--spacing-24));
51
+ --bd-badge-white-space: normal;
46
52
  }
47
53
 
48
54
  .body {
@@ -118,4 +124,12 @@ export const postCardCSS = css`
118
124
  height: auto;
119
125
  }
120
126
  }
127
+
128
+ /* A newline in the text is a line break, so a page can keep the breaks its
129
+ copy was written with (a <br> in the authored eyebrow, heading or lead
130
+ arrives as a newline in the property). Text only: nothing here renders
131
+ HTML. */
132
+ .heading {
133
+ white-space: pre-line;
134
+ }
121
135
  `;