@slotted/styles 0.1.0-beta.39 → 0.1.0-beta.40

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slotted/styles",
3
- "version": "0.1.0-beta.39",
3
+ "version": "0.1.0-beta.40",
4
4
  "description": "Per-family stylesheets of Slotted, bundled by the React and Angular bindings.",
5
5
  "keywords": [
6
6
  "slotted",
@@ -71,6 +71,8 @@
71
71
  "./carousel/tokens.json": "./src/carousel/carousel.tokens.json",
72
72
  "./checkbox/checkbox.css": "./src/checkbox/checkbox.css",
73
73
  "./checkbox/tokens.json": "./src/checkbox/checkbox.tokens.json",
74
+ "./clock/clock.css": "./src/clock/clock.css",
75
+ "./clock/tokens.json": "./src/clock/clock.tokens.json",
74
76
  "./code-block/code-block.css": "./src/code-block/code-block.css",
75
77
  "./code-block/tokens.json": "./src/code-block/code-block.tokens.json",
76
78
  "./collapsible/collapsible.css": "./src/collapsible/collapsible.css",
@@ -185,6 +187,8 @@
185
187
  "./page-header/tokens.json": "./src/page-header/page-header.tokens.json",
186
188
  "./pagination/pagination.css": "./src/pagination/pagination.css",
187
189
  "./pagination/tokens.json": "./src/pagination/pagination.tokens.json",
190
+ "./picker-panel/picker-panel.css": "./src/picker-panel/picker-panel.css",
191
+ "./picker-panel/tokens.json": "./src/picker-panel/picker-panel.tokens.json",
188
192
  "./popover/popover.css": "./src/popover/popover.css",
189
193
  "./popover/tokens.json": "./src/popover/popover.tokens.json",
190
194
  "./progress-indicator/progress-indicator.css": "./src/progress-indicator/progress-indicator.css",
@@ -21,11 +21,10 @@
21
21
  * clipped and nothing escapes: the frame reserves, and it never crops. The
22
22
  * crop is `image`'s decision, taken with `fit`.
23
23
  *
24
- * A replaced child contributes nothing to that minimum: css-sizing-3 §5.2.1
25
- * resolves a cyclic percentage on a replaced element against zero for the
26
- * min-content contribution, so a 4000-pixel photograph at `block-size: 100%`
27
- * does not grow the frame to 4000 pixels. Only content with a height of its
28
- * own — text, a control, a card — can.
24
+ * A replaced child contributes nothing to that minimum: its size is
25
+ * contained, so a 4000-pixel photograph does not grow the frame to 4000
26
+ * pixels. Only content with a height of its own — text, a control, a card —
27
+ * can.
29
28
  */
30
29
  [data-ui-aspect-ratio][data-part-root] {
31
30
  /**
@@ -48,8 +47,10 @@
48
47
  display: grid;
49
48
  grid-template-columns: minmax(0, 1fr);
50
49
  grid-template-rows: 1fr;
51
- /* The width the container gives, and never more. */
52
- max-inline-size: 100%;
50
+ /* No inline maximum: through the ratio it becomes a block maximum, and in
51
+ a flex column that held the frame at its ratio around taller content.
52
+ The width stays the container's because no child contributes one of
53
+ its own beyond the content it holds. */
53
54
  min-inline-size: 0;
54
55
  }
55
56
 
@@ -110,19 +111,19 @@
110
111
  * `picture` is in the list so its `img` sees a definite box to be 100 %
111
112
  * of; an `iframe` and a `canvas` take the size and have no `object-fit`.
112
113
  *
113
- * `min-block-size: 0` is what keeps the frame at its ratio around a
114
- * photograph. A grid item's automatic minimum is content-based, and while
115
- * the row is being sized the percentage height is treated as `auto`, so
116
- * the item asked for its natural height and a 4:3 photograph grew a 16:9
117
- * frame to 4:3 (measured in the first capture of the `media` scene). A
118
- * replaced element has nothing to say about the frame's height; the text
114
+ * `contain: size` is what keeps the frame at its ratio around a photograph.
115
+ * While the row is being sized the percentage height is treated as `auto`,
116
+ * so the item asked for its natural height and a 4:3 photograph grew a 16:9
117
+ * frame to 4:3 (measured in the first capture of the `media` scene); its
118
+ * natural width widened a frame that had no width of its own the same way.
119
+ * A replaced element has nothing to say about the frame's size; the text
119
120
  * child above keeps its automatic minimum, and the growth rule with it.
120
121
  */
121
122
  [data-ui-aspect-ratio][data-part-root] > :is(img, video, canvas, svg, iframe, picture) {
122
123
  block-size: 100%;
124
+ contain: size;
123
125
  display: block;
124
126
  inline-size: 100%;
125
- min-block-size: 0;
126
127
  }
127
128
 
128
129
  [data-ui-aspect-ratio][data-part-root] > :is(img, video) {
@@ -395,6 +395,9 @@
395
395
  display: inline-flex;
396
396
  position: relative;
397
397
  vertical-align: middle;
398
+ /* The corner is the host's: a flex or grid parent stretches an auto size. */
399
+ block-size: fit-content;
400
+ inline-size: fit-content;
398
401
  }
399
402
 
400
403
  [data-ui-badge][data-part-anchor]:dir(rtl) {