Skip to content

Document why blobs are not used #327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 24, 2025
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ 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 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');
styleEl.textContent = css;
for (const name of el.getAttributeNames()) {
Expand Down
Loading