Skip to content
Merged
Changes from all 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
9 changes: 7 additions & 2 deletions Apps/Sandcastle/CesiumSandcastle.js
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,10 @@ require({

// Apply user HTML to bucket.
const htmlElement = bucketDoc.createElement("div");
htmlElement.innerHTML = htmlEditor.getValue();
// Stylesheet imports are weirdly broken in Firefox 140. This is a hacky workaround
// https://github.com/CesiumGS/cesium/issues/12700
const htmlCode = htmlEditor.getValue().replace(/@import/, "@import ");
htmlElement.innerHTML = htmlCode;
bucketDoc.body.appendChild(htmlElement);

const onScriptTagError = function () {
Expand Down Expand Up @@ -1176,7 +1179,9 @@ require({
baseHref = `${baseHref.substring(0, pos)}/gallery/`;

const code = jsEditor.getValue();
const html = htmlEditor.getValue();
// Stylesheet imports are weirdly broken in Firefox 140. This is a hacky workaround
// https://github.com/CesiumGS/cesium/issues/12700
const html = htmlEditor.getValue().replace(/@import/, "@import ");
const data = makeCompressedBase64String([code, html, baseHref]);

let url = getBaseUrl();
Expand Down