diff --git a/src/api/OpenProcessing.ts b/src/api/OpenProcessing.ts index adb842b669..b73255db5b 100644 --- a/src/api/OpenProcessing.ts +++ b/src/api/OpenProcessing.ts @@ -104,11 +104,6 @@ export const getSketch = memoize( return payload as OpenProcessingSketchResponse; }); -/** - * Note: this currently calls `/api/sketch/:id/code` - * But only uses the width and height properties from this call - * Width and height should instead be added to properties for `/api/sketch/:id` or `api/curation/:curationId/sketches` instead - */ export const getSketchSize = memoize(async (id: string) => { const sketch = await getSketch(id) if (sketch.mode !== 'p5js') { diff --git a/src/components/Image/index.astro b/src/components/Image/index.astro index 1aa6a0825d..0115d5fc7c 100644 --- a/src/components/Image/index.astro +++ b/src/components/Image/index.astro @@ -37,8 +37,7 @@ const noAltText = t("No alt text"); class:list={[ "renderable-alt", "text-body-caption", - "bg-bg-gray-40 absolute top-0 mt-sm mx-sm px-[7.5px] pb-[2.5px] rounded-xl text-ellipsis", - "line-clamp-3 hover:line-clamp-none", + "bg-bg-gray-40 absolute top-0 mt-sm mx-sm px-[7.5px] pb-[2.5px] rounded-xl", props.visibleAltTextClass, ]} > diff --git a/styles/global.scss b/styles/global.scss index 5f34f2ec78..85a30c7cc2 100644 --- a/styles/global.scss +++ b/styles/global.scss @@ -509,6 +509,15 @@ input[type="search"]::-webkit-search-results-decoration { .show-alt-text .renderable-alt { display: -webkit-box; // Needs webkit box to support line-clamp + // The below is a workaround for known issues with Safari compatibility for Tailwind line-clamp + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; + -webkit-line-clamp: 3; +} + +.show-alt-text .renderable-alt:hover { + -webkit-line-clamp: unset; } .dark-theme.monochrome-theme .renderable-alt{