Skip to content

Commit 5718ddc

Browse files
authored
Various bug fixes (#128)
* fix: bundle ESM packages to improve library compatibility * fix: avoid safari rendering bug * fix: select new tab when creating one * fix: heading selection rendering on firefox/gecko
1 parent 8f3052d commit 5718ddc

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

src/routes/+layout.style.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ p {
7373
::selection {
7474
color: var(--section-color-dim-alt, var(--color-red-dim-alt));
7575
background-color: var(--section-color-alt, var(--color-red-alt));
76+
-webkit-text-fill-color: var(
77+
--section-color-dim-alt,
78+
var(--color-red-dim-alt)
79+
);
7680
}
7781

7882
body {

src/routes/playground/tags/playground/tags/editor/tags/tabs/tabs.marko

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ div class=styles.tabs
8989
9090
if (filename) {
9191
if (!filename.includes(".")) filename += ".marko";
92+
selected = tabs.length;
9293
tabs = [...tabs, { path: filename, content: "" }];
93-
selected = tabs.length - 1;
9494
}
9595
}
9696
,class=styles.add

src/styles/sticky.scss

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,17 @@ $pageLinksHeight: 3.5rem;
2323
}
2424

2525
@mixin supported {
26+
// On large screens, exclude Safari because of a rendering bug with scaleY
27+
@supports (animation-timeline: scroll()) and (not (-webkit-hyphens: none)) {
28+
@media (width >= 48rem) and (height >= 38rem) {
29+
@content;
30+
}
31+
}
32+
33+
// On small screens, include Safari
2634
@supports (animation-timeline: scroll()) {
27-
@content;
35+
@media (width < 48rem) or (height < 38rem) {
36+
@content;
37+
}
2838
}
2939
}

src/util/workspace/cdn-plugin.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ export function cdnPlugin(): Plugin {
1414
}
1515

1616
if (/^[^\0.\/]/.test(id)) {
17-
return { id: `https://esm.sh/${id}`, external: true };
17+
return {
18+
id: `https://esm.sh/${id}?bundle`,
19+
external: true,
20+
};
1821
}
1922
},
2023
};

0 commit comments

Comments
 (0)