barua-ui 0.9.0 → 0.9.2

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.
@@ -117,6 +117,14 @@
117
117
  .b-card--flush .b-card__body { padding: 0; }
118
118
  .b-card--flush .b-list { border: none; border-radius: 0; box-shadow: none; }
119
119
 
120
+ /* A card in a grid already stretches to the row's height; its body does not,
121
+ so a stack inside stops where its content stops and the button at the end
122
+ lands wherever the copy above happened to finish. Three prices with three
123
+ different feature lists gave three different buttons. --fill hands the
124
+ height down, so a .b-spacer inside pins the last row to the floor. */
125
+ .b-card--fill { display: flex; flex-direction: column; }
126
+ .b-card--fill > .b-card__body { flex: 1 1 auto; }
127
+
120
128
  .b-card__art {
121
129
  width: 4rem;
122
130
  height: 4rem;
@@ -81,6 +81,10 @@
81
81
  justify-content: center;
82
82
  margin-block-start: var(--b-space-6);
83
83
  }
84
+ /* What a chapter shows under its words: a rail of cards, a grid, a picture.
85
+ Same standoff as the actions row, so a chapter with cards and a chapter
86
+ with buttons breathe alike. */
87
+ .b-chapter__media { margin-block-start: var(--b-space-8); text-align: start; }
84
88
  .b-chapter--start .b-chapter__actions { justify-content: flex-start; }
85
89
  .b-feature-row .b-chapter__actions { justify-content: flex-start; margin-block-start: var(--b-space-5); }
86
90
 
@@ -105,7 +109,10 @@
105
109
  inset: 0;
106
110
  z-index: 0;
107
111
  pointer-events: none;
108
- --b-tile: 5.5rem;
112
+ /* The cell scales with the viewport. Held at a fixed size it kept its
113
+ pixel grain while the hero got narrow, so on a phone the whisper of a
114
+ pattern became grey blocks sitting behind the headline. */
115
+ --b-tile: clamp(2.25rem, 5.5vw, 5.5rem);
109
116
  /* The field paints its own ground, a shade off the page, and the squares
110
117
  sit *lighter* on it — which is the only way the pattern is visible on a
111
118
  white page and still barely there on a dark one. Two knobs, both
@@ -126,6 +133,14 @@
126
133
  -webkit-mask-image: radial-gradient(120% 85% at 50% 0%, #000 0%, transparent 72%);
127
134
  mask-image: radial-gradient(120% 85% at 50% 0%, #000 0%, transparent 72%);
128
135
  }
136
+ /* A hero on a phone is a different shape: tall and narrow, with the words
137
+ starting much higher up. The field has to be done before they get there. */
138
+ @media (max-width: 40rem) {
139
+ .b-tile-field {
140
+ -webkit-mask-image: radial-gradient(150% 52% at 50% 0%, #000 0%, transparent 70%);
141
+ mask-image: radial-gradient(150% 52% at 50% 0%, #000 0%, transparent 70%);
142
+ }
143
+ }
129
144
  /* Anything that has to sit on top of it says so once. */
130
145
  .b-tile-field ~ * { position: relative; z-index: 1; }
131
146
 
@@ -263,7 +278,17 @@
263
278
  overflow: hidden;
264
279
  background: color-mix(in srgb, var(--b-color-accent) 14%, var(--b-fill-tertiary));
265
280
  }
266
- .b-resource-card__poster :is(img, svg) { width: 100%; height: 100%; object-fit: cover; }
281
+ /* A picture fills the plate. A glyph is not a picture: stretched to the same
282
+ rule it became a two-hundred-pixel sparkle, which is how a stand-in ends up
283
+ louder than the thing it stands in for. It keeps a glyph's size and the
284
+ plate's quieter ink instead. */
285
+ .b-resource-card__poster > img { width: 100%; height: 100%; object-fit: cover; }
286
+ .b-resource-card__poster > svg,
287
+ .b-resource-card__poster > :not(img):not(.b-resource-card__type) svg {
288
+ width: var(--b-space-12);
289
+ height: var(--b-space-12);
290
+ color: color-mix(in srgb, var(--b-color-accent) 55%, var(--b-text-tertiary));
291
+ }
267
292
  .b-resource-card__type {
268
293
  position: absolute;
269
294
  inset-block-start: var(--b-space-3);
package/css/tokens.css CHANGED
@@ -11,8 +11,13 @@
11
11
  declaration sits on, so re-declaring them here is what lets a subtree be
12
12
  light inside a dark page — a marketing page in a dark product, a preview
13
13
  pane, a customer's site. Without it, data-theme on anything but the root
14
- only changed color-scheme and the tokens stayed as the root resolved them. */
15
- :root, [data-theme] {
14
+ only changed color-scheme and the tokens stayed as the root resolved them.
15
+
16
+ .b-chapter--dark is in the list for the same reason: a chapter that inverts
17
+ IS a themed subtree, and flipping its color-scheme alone left every token
18
+ inside still resolved against the page it sits in, so the dark band came
19
+ out light. Naming it here keeps one copy of the token block. */
20
+ :root, [data-theme], .b-chapter--dark {
16
21
  color-scheme: light dark;
17
22
 
18
23
  /* ------------------------------------------------------------------ *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "barua-ui",
3
- "version": "0.9.0",
4
- "description": "Barua UI \u2014 Apple-DNA design system (glass materials, Barua blue) as React components over pure CSS.",
3
+ "version": "0.9.2",
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",
7
7
  "sideEffects": [