barua-ui 0.11.0 → 0.12.1

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.
@@ -60,9 +60,18 @@
60
60
  /* ---- Chapter: one idea, centred, with room around it --------------------- */
61
61
  .b-chapter {
62
62
  padding-block: var(--b-chapter-gap);
63
- padding-inline: var(--b-space-6);
63
+ /* The page's margin, and now the only one: it is a sixth of a phone's width
64
+ at 390 and sixty pixels on a desktop, where before the chapter and the
65
+ container each took their own and the phone paid for both. */
66
+ padding-inline: clamp(var(--b-space-4), 4.5vw, var(--b-space-16));
64
67
  text-align: center;
65
68
  }
69
+ /* Padding stacks, and nobody notices on a desktop. A chapter pads, a
70
+ container inside it pads again, and a list row inside that pads a third
71
+ time: on a 390px phone that left 236px for the words, which is under thirty
72
+ characters a line. The chapter already holds the page's margins, so a
73
+ container inside one does not repeat them. */
74
+ .b-chapter > .b-container { padding-inline: 0; }
66
75
  .b-chapter--tight { padding-block: calc(var(--b-chapter-gap) * 0.55); }
67
76
  .b-chapter--start { text-align: start; }
68
77
  .b-chapter__eyebrow {
@@ -228,23 +237,34 @@
228
237
  width: max-content;
229
238
  animation: b-marquee var(--b-marquee-time, 40s) linear infinite;
230
239
  }
231
- .b-marquee__group {
240
+ /* Named twice on purpose. A group almost always carries a row class as well
241
+ (.b-logo-wall is the usual one), and those are defined later in this layer,
242
+ so at equal specificity they were winning: the wall's justify-content
243
+ centred each group inside its floored width and the two dead ends met at
244
+ the seam as one wide hole, which is the bug the group was added to fix.
245
+ The three properties that make a marquee a marquee are not the row's to
246
+ decide. The rhythm still is: set --b-marquee-gap. */
247
+ .b-marquee .b-marquee__group {
248
+ --b-marquee-gap: clamp(var(--b-space-6), 5vw, var(--b-space-12));
232
249
  display: flex;
233
250
  flex: none;
251
+ flex-wrap: nowrap;
234
252
  align-items: center;
235
253
  justify-content: space-around;
236
- gap: clamp(var(--b-space-6), 5vw, var(--b-space-12));
254
+ gap: var(--b-marquee-gap);
237
255
  min-width: 100cqi;
238
- /* Half the gap on each end, so the seam between the two groups is spaced
239
- exactly like the gaps inside one. */
240
- padding-inline: clamp(var(--b-space-3), 2.5vw, var(--b-space-6));
256
+ /* space-around leaves half a share at each end, so a seam is already half
257
+ plus half. The gap is a separate, fixed minimum that only applies BETWEEN
258
+ items, so without this the seam came up exactly one gap short of every
259
+ other space in the belt. Half at each end restores it. */
260
+ padding-inline: calc(var(--b-marquee-gap) / 2);
241
261
  }
242
262
  .b-marquee:hover .b-marquee__track { animation-play-state: paused; }
243
263
  @keyframes b-marquee { to { translate: -50% 0; } }
244
264
  @media (prefers-reduced-motion: reduce) {
245
265
  .b-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
246
266
  .b-marquee__track { animation: none; }
247
- .b-marquee__group { min-width: 0; }
267
+ .b-marquee .b-marquee__group { min-width: 0; }
248
268
  }
249
269
 
250
270
  /* ---- Quote card: a number, a sentence, and who said it -------------------
@@ -329,6 +349,18 @@
329
349
  height: var(--b-space-12);
330
350
  color: color-mix(in srgb, var(--b-color-accent) 55%, var(--b-text-tertiary));
331
351
  }
352
+ /* Stacked one per phone screen, a 16:9 plate is nearly two hundred pixels of
353
+ nothing but a glyph, three times over. It becomes a banner instead: the
354
+ type badge still reads, the card still has a face, and the section stops
355
+ costing half a screen per card. */
356
+ @media (max-width: 40rem) {
357
+ .b-resource-card__poster { aspect-ratio: 4 / 1; }
358
+ .b-resource-card__poster > svg,
359
+ .b-resource-card__poster > :not(img):not(.b-resource-card__type) svg {
360
+ width: var(--b-space-8);
361
+ height: var(--b-space-8);
362
+ }
363
+ }
332
364
  .b-resource-card__type {
333
365
  position: absolute;
334
366
  inset-block-start: var(--b-space-3);
@@ -422,6 +454,10 @@
422
454
  middle of a tall column and stops looking like the title of what is next
423
455
  to it. --top puts both columns on the same line. */
424
456
  .b-feature-row--top { align-items: start; }
457
+ /* Same argument one level down: a list that IS a column of the row has the
458
+ row's margins already, and indenting every row inside it pushes the text
459
+ off the page's grid for no gain. */
460
+ .b-feature-row > .b-list--plain > .b-list-item { padding-inline: 0; }
425
461
  .b-feature-row__title {
426
462
  font-size: clamp(1.5rem, 3vw, 2.25rem);
427
463
  font-weight: var(--b-weight-semibold);
package/css/utilities.css CHANGED
@@ -108,10 +108,27 @@
108
108
  gap: var(--b-gap, var(--b-space-4));
109
109
  grid-template-columns: repeat(var(--b-cols, 12), minmax(0, 1fr));
110
110
  }
111
- .b-grid--2 { --b-cols: 2; }
112
- .b-grid--3 { --b-cols: 3; }
113
- .b-grid--4 { --b-cols: 4; }
114
- .b-grid--6 { --b-cols: 6; }
111
+ /* N equal cards side by side is a desktop shape, and these modifiers held N
112
+ at every width: three pricing cards on a 390px phone came out 110px wide
113
+ with one word per line, and every page in the system that used them looked
114
+ like that on the device most people arrive on. They start at one column
115
+ and earn more. Anything that genuinely wants a fixed count at every size
116
+ sets --b-cols itself, which is what these are written in terms of. */
117
+ .b-grid--2,
118
+ .b-grid--3,
119
+ .b-grid--4,
120
+ .b-grid--6 { --b-cols: 1; }
121
+ @media (min-width: 36rem) {
122
+ .b-grid--2 { --b-cols: 2; }
123
+ .b-grid--3 { --b-cols: 2; }
124
+ .b-grid--4 { --b-cols: 2; }
125
+ .b-grid--6 { --b-cols: 3; }
126
+ }
127
+ @media (min-width: 62rem) {
128
+ .b-grid--3 { --b-cols: 3; }
129
+ .b-grid--4 { --b-cols: 4; }
130
+ .b-grid--6 { --b-cols: 6; }
131
+ }
115
132
  .b-grid--auto {
116
133
  grid-template-columns: repeat(auto-fill, minmax(var(--b-col-min, 16rem), 1fr));
117
134
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "barua-ui",
3
- "version": "0.11.0",
3
+ "version": "0.12.1",
4
4
  "description": "Barua UI — Apple-DNA design system (glass materials, Barua blue) as React components over pure CSS.",
5
5
  "license": "MIT",
6
6
  "type": "module",