From e24f487368804b0914dbf0af8f74f600a1b24da8 Mon Sep 17 00:00:00 2001 From: James Stuckey Weber Date: Thu, 24 Apr 2025 15:30:08 -0400 Subject: [PATCH 1/3] Document why blobs are not used --- src/transform.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/transform.ts b/src/transform.ts index 4e0b894f..f862aba5 100644 --- a/src/transform.ts +++ b/src/transform.ts @@ -34,7 +34,11 @@ export function transformCSS( // Handle inline stylesheets el.innerHTML = css; } else if (el instanceof HTMLLinkElement) { - // Replace link elements with style elements + // Replace link elements with style elements We use inline style + // elements rather link elements with blob URLs, as relative URLs for + // things like images and fonts are not supported in blob URLs. See + // https://github.com/oddbird/css-anchor-positioning/pull/324 for more + // discussion. const styleEl = document.createElement('style'); styleEl.textContent = css; for (const name of el.getAttributeNames()) { From d63f9b26c5fd261d5ec0e4e12163329357c595ea Mon Sep 17 00:00:00 2001 From: Jonny Gerig Meyer Date: Thu, 24 Apr 2025 15:38:44 -0400 Subject: [PATCH 2/3] typo --- src/transform.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/transform.ts b/src/transform.ts index f862aba5..5204fe4d 100644 --- a/src/transform.ts +++ b/src/transform.ts @@ -34,9 +34,10 @@ export function transformCSS( // Handle inline stylesheets el.innerHTML = css; } else if (el instanceof HTMLLinkElement) { - // Replace link elements with style elements We use inline style - // elements rather link elements with blob URLs, as relative URLs for - // things like images and fonts are not supported in blob URLs. See + // Replace link elements with style elements. + // We use inline style elements rather then link elements with blob + // URLs, as relative URLs for things like images and fonts are not + // supported in blob URLs. See // https://github.com/oddbird/css-anchor-positioning/pull/324 for more // discussion. const styleEl = document.createElement('style'); From 26d6ee82a90f9e947475956df4f5300334ac3bd1 Mon Sep 17 00:00:00 2001 From: Jonny Gerig Meyer Date: Thu, 24 Apr 2025 15:39:08 -0400 Subject: [PATCH 3/3] typo2 --- src/transform.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transform.ts b/src/transform.ts index 5204fe4d..2a61f3ae 100644 --- a/src/transform.ts +++ b/src/transform.ts @@ -35,7 +35,7 @@ export function transformCSS( el.innerHTML = css; } else if (el instanceof HTMLLinkElement) { // Replace link elements with style elements. - // We use inline style elements rather then link elements with blob + // We use inline style elements rather than link elements with blob // URLs, as relative URLs for things like images and fonts are not // supported in blob URLs. See // https://github.com/oddbird/css-anchor-positioning/pull/324 for more