barua-ui 0.3.1 → 0.3.3
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.
- package/css/components/content.css +41 -1
- package/package.json +1 -1
|
@@ -33,7 +33,36 @@
|
|
|
33
33
|
}
|
|
34
34
|
.b-card__title { font-size: var(--b-text-headline); font-weight: var(--b-weight-semibold); }
|
|
35
35
|
.b-card__subtitle { font-size: var(--b-text-footnote); color: var(--b-text-secondary); }
|
|
36
|
-
|
|
36
|
+
/*
|
|
37
|
+
* The media slot works two ways and only one of them used to.
|
|
38
|
+
*
|
|
39
|
+
* When the slot IS the picture — <img class="b-card__media"> — object-fit
|
|
40
|
+
* crops it and all is well. When it WRAPS one, which is what a card with a
|
|
41
|
+
* zoom button or an async image needs, object-fit does nothing: it only
|
|
42
|
+
* applies to replaced elements. The child then rendered at its natural size
|
|
43
|
+
* and burst out of the card, and anything positioned absolutely inside it
|
|
44
|
+
* escaped to the page, because there was no positioned ancestor to hold it.
|
|
45
|
+
*/
|
|
46
|
+
.b-card__media {
|
|
47
|
+
position: relative;
|
|
48
|
+
width: 100%;
|
|
49
|
+
aspect-ratio: 16 / 9;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
object-fit: cover;
|
|
52
|
+
}
|
|
53
|
+
/* Direct children fill the slot; the picture fills whatever wraps it, at any
|
|
54
|
+
depth, because a zoom button or an async-image span usually sits between. */
|
|
55
|
+
.b-card__media > * {
|
|
56
|
+
display: block;
|
|
57
|
+
width: 100%;
|
|
58
|
+
height: 100%;
|
|
59
|
+
}
|
|
60
|
+
.b-card__media :is(img, video, picture) {
|
|
61
|
+
display: block;
|
|
62
|
+
width: 100%;
|
|
63
|
+
height: 100%;
|
|
64
|
+
object-fit: cover;
|
|
65
|
+
}
|
|
37
66
|
.b-card__eyebrow {
|
|
38
67
|
font-size: var(--b-text-caption);
|
|
39
68
|
font-weight: var(--b-weight-semibold);
|
|
@@ -307,6 +336,17 @@
|
|
|
307
336
|
border: 1px solid var(--b-separator);
|
|
308
337
|
border-radius: var(--b-radius-lg);
|
|
309
338
|
}
|
|
339
|
+
|
|
340
|
+
/* A table inside a card must not bring its own frame.
|
|
341
|
+
The wrap carries a border and a smaller radius than the card, so its
|
|
342
|
+
corners cut inside the card's and the surface shows through as a notch —
|
|
343
|
+
the card already provides the edge, and two frames read as a mistake. */
|
|
344
|
+
.b-card > .b-table-wrap {
|
|
345
|
+
border: 0;
|
|
346
|
+
border-radius: 0;
|
|
347
|
+
background: transparent;
|
|
348
|
+
}
|
|
349
|
+
|
|
310
350
|
.b-table {
|
|
311
351
|
width: 100%;
|
|
312
352
|
border-collapse: collapse;
|