@justai/cuts 0.142.0 → 0.143.0
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 +1 -1
- package/src/CatalogueCard.astro +4 -1
- package/src/ChildPersona.astro +7 -2
- package/src/Posts.astro +13 -1
- package/src/Profile.astro +4 -1
package/package.json
CHANGED
package/src/CatalogueCard.astro
CHANGED
|
@@ -90,7 +90,10 @@ const icon = `${app.url}/icon.svg`;
|
|
|
90
90
|
width: 60px;
|
|
91
91
|
height: 60px;
|
|
92
92
|
border-radius: var(--radius-md);
|
|
93
|
-
|
|
93
|
+
/* contain: this is a persona's mark, not a photograph. A square tile is unaffected — the two
|
|
94
|
+
declarations agree on square art — and a mark taller than its box keeps its ends instead of
|
|
95
|
+
having them cropped. See the note on .pa .mk in Posts.astro. */
|
|
96
|
+
object-fit: contain;
|
|
94
97
|
box-shadow: 0 8px 20px -12px rgba(0, 0, 0, 0.35);
|
|
95
98
|
}
|
|
96
99
|
|
package/src/ChildPersona.astro
CHANGED
|
@@ -269,8 +269,13 @@ const chrome = face === "page";
|
|
|
269
269
|
.pp[data-face="sheet"] .app { max-width: none; margin-inline: 0; border: 0; background: none;
|
|
270
270
|
backdrop-filter: none; -webkit-backdrop-filter: none; }
|
|
271
271
|
|
|
272
|
-
/*
|
|
273
|
-
|
|
272
|
+
/* A MARK FILLS ITS BOX AND LOSES NOTHING DOING IT. This said `cover`, which fills by scaling to the
|
|
273
|
+
larger ratio and cropping the overflow off both edges. Square art renders identically either way —
|
|
274
|
+
which is why it survived on every child page — but pin.games' mark is 700.19 x 767.26, so `cover`
|
|
275
|
+
took 4.8% off its top and 4.8% off its bottom, and those are the blue bracket and the red one.
|
|
276
|
+
Same change, same reason, as .pa .mk in Posts.astro. The feed service carries a fork of this
|
|
277
|
+
stylesheet and had lost the rule entirely; it is `contain` there now too. */
|
|
278
|
+
.pp .mk { display: block; width: 100%; height: 100%; object-fit: contain; }
|
|
274
279
|
|
|
275
280
|
/* Motion is never forced on somebody who asked it not to be — and the biggest effects, the ones a
|
|
276
281
|
surface is proudest of, are exactly what that setting exists to suppress. */
|
package/src/Posts.astro
CHANGED
|
@@ -268,7 +268,19 @@ const vars = [
|
|
|
268
268
|
}
|
|
269
269
|
.rav { flex: none; width: 30px; height: 30px; border-radius: var(--radius-sm); display: grid; place-items: center; font-size: 15px; background: var(--feed-av-bg, #fff); border: 1px solid var(--border); overflow: hidden; }
|
|
270
270
|
.pa :global(svg), .rav :global(svg) { display: block; }
|
|
271
|
-
|
|
271
|
+
/* queries: the avatar is cropped · blue and red pieces cut off · pin.games mark clipped top and
|
|
272
|
+
bottom · a mark loses its tips in the feed · cover vs contain for a persona icon
|
|
273
|
+
CONTAIN, NOT COVER — THE SLOT IS FORGIVING, THE ASSET NEED NOT BE PERFECT. `cover` fills the box
|
|
274
|
+
by scaling to the LARGER ratio and cropping the overflow, split evenly between the two edges. For
|
|
275
|
+
a square drawing in a square slot the two are the same declaration, which is why this stood for
|
|
276
|
+
twenty-six personas without a complaint: every fleet icon.svg is square. pin.games' mark is not —
|
|
277
|
+
its box is 700.19 x 767.26, so `cover` scaled it by width, overflowed the height by 9.6%, and took
|
|
278
|
+
4.8% off the top and 4.8% off the bottom. What lives at the top and bottom of that drawing is the
|
|
279
|
+
blue bracket and the red one, which is exactly the pair the founder reported as cut. On a 76px
|
|
280
|
+
profile avatar that is 3.6px gone from each end.
|
|
281
|
+
Squaring the asset is the other half of this and is being done too, but it is not a substitute:
|
|
282
|
+
an asset can be redrawn wrong tomorrow, while a slot that never crops cannot crop anyone. */
|
|
283
|
+
.pa .mk, .rav .mk { width: 100%; height: 100%; object-fit: contain; display: block; }
|
|
272
284
|
/* a dark tile must invert in light mode, not stay dark — personas whose avatar ground is a gradient
|
|
273
285
|
pass avatarBgLight; the rest fall back to their single background. */
|
|
274
286
|
@media (prefers-color-scheme: light) { :global(html:not([data-theme="dark"])) .pa, :global(html:not([data-theme="dark"])) .rav { background: var(--feed-av-bg-light, var(--feed-av-bg, #fff)); } }
|
package/src/Profile.astro
CHANGED
|
@@ -127,7 +127,10 @@ const vars = [
|
|
|
127
127
|
@media (prefers-reduced-motion: reduce) { .avatar { transition: none; } }
|
|
128
128
|
/* the avatar content is slotted (persona-owned) → style it globally */
|
|
129
129
|
.avatar :global(svg) { width: 100%; height: 100%; display: block; }
|
|
130
|
-
|
|
130
|
+
/* contain, not cover — see the note on .pa .mk in Posts.astro. A square icon renders identically
|
|
131
|
+
under either; a mark whose box is taller than wide loses its top and its bottom under `cover`,
|
|
132
|
+
which is what cropped pin.games' blue and red brackets on this very avatar. */
|
|
133
|
+
.avatar :global(img) { width: 100%; height: 100%; display: block; object-fit: contain; }
|
|
131
134
|
@media (prefers-color-scheme: light) {
|
|
132
135
|
:global(html:not([data-theme="dark"])) .avatar { border-color: #fff; background: var(--avatar-bg-light, var(--avatar-bg, #fff)); }
|
|
133
136
|
}
|