@meowdown/embed 0.3.0 → 0.3.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.
Files changed (2) hide show
  1. package/dist/x/theme.css +7 -1
  2. package/package.json +1 -1
package/dist/x/theme.css CHANGED
@@ -77,12 +77,13 @@
77
77
  --_tint: color-mix(in srgb, currentColor 5%, transparent);
78
78
  --_media-height: 7.5rem;
79
79
  --_show-more-height: 2rem;
80
+ --_max-width: 28rem;
80
81
 
81
82
  display: block;
82
83
  /* As wide as the content, between 18rem and 28rem: a short text post stays
83
84
  * small, while long text and media fill the full width. */
84
85
  width: fit-content;
85
- max-width: min(28rem, 100%);
86
+ max-width: min(var(--_max-width), 100%);
86
87
  font: inherit;
87
88
  color: var(--meowdown-embed-color, inherit);
88
89
  text-decoration-skip-ink: none;
@@ -105,6 +106,11 @@
105
106
  [data-meowdown-embed='x'] [data-root] {
106
107
  display: block;
107
108
  position: relative;
109
+ /* The host's percentage `max-width` counts as `none` when a shrink-to-fit
110
+ * parent (an inline-block editor wrapper) measures the card, so long text
111
+ * would widen that parent to its own limit. A fixed cap here keeps the
112
+ * card's intrinsic width at 28rem. */
113
+ max-width: var(--_max-width);
108
114
  color: var(--meowdown-embed-color, inherit);
109
115
  background: var(--meowdown-embed-background, transparent);
110
116
  border: 1px solid var(--_hairline);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meowdown/embed",
3
3
  "type": "module",
4
- "version": "0.3.0",
4
+ "version": "0.3.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",