Skip to content

Commit 98f5fc0

Browse files
committed
Fixes for SVG in Safari
1 parent 884874c commit 98f5fc0

File tree

14 files changed

+19
-16
lines changed

14 files changed

+19
-16
lines changed

assets/discord-logo.svg

Lines changed: 1 addition & 1 deletion
Loading

assets/github-logo.svg

Lines changed: 1 addition & 1 deletion
Loading

assets/linkedin-logo.svg

Lines changed: 1 addition & 1 deletion
Loading

assets/mail-logo.svg

Lines changed: 1 addition & 1 deletion
Loading

assets/moon-icon.svg

Lines changed: 1 addition & 1 deletion
Loading

assets/sun-icon.svg

Lines changed: 1 addition & 1 deletion
Loading

assets/twitter-logo.svg

Lines changed: 1 addition & 1 deletion
Loading

assets/x-logo.svg

Lines changed: 1 addition & 1 deletion
Loading

assets/zhihu-logo.svg

Lines changed: 1 addition & 1 deletion
Loading

src/Layout/Navbar/ColorModeToggle/index.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
.icon {
1616
padding: 0.2rem;
17+
width: 100%;
1718
color: var(--color-text);
1819
fill: var(--color-text);
1920
}

src/components/Scrolly/Elements.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,5 @@
6666

6767
.eyebrow {
6868
animation: raising 10s infinite;
69+
fill: var(--color-text);
6970
}

src/components/Scrolly/Elements.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function ScrollyElements(
4848
const cSizeH = getVal(cSizeHs);
4949
const textSize = getVal(textSizes);
5050
const { colorMode } = useColorMode();
51-
const jColors = colorMode === "dark" ? [1, 1] : [0, 1];
51+
const jColors = colorMode === "dark" ? [255, 255] : [0, 255];
5252
return (
5353
<svg
5454
ref={ref}
@@ -67,8 +67,9 @@ function ScrollyElements(
6767
}, ${getVal(jCenterXs) - (jCenterOrig.x * jSizeW) / jSizeOrig.w}, ${
6868
getVal(jCenterYs) - (jCenterOrig.y * jSizeH) / jSizeOrig.h
6969
})`}
70-
fill="var(--color-text)"
71-
filter={`brightness(${getVal(jColors)})`}
70+
fill={`rgb(${getVal(jColors)}, ${getVal(jColors)}, ${getVal(
71+
jColors,
72+
)})`}
7273
d="m 25.000024,33.983972 c 0,6.666603 0,13.333209 0,19.999811 21.206457,0 42.412914,0 63.619371,0 C 76.268383,84.308203 63.917371,114.63262 51.56636,144.95704 43.949254,138.6582 36.332149,132.35936 28.715044,126.06052 c -4.215592,5.09771 -8.431183,10.19542 -12.646774,15.29312 14.560523,12.04027 29.121047,24.08053 43.68157,36.1208 16.765902,-41.16356 33.531802,-82.327105 50.2977,-123.490657 21.65088,0 43.30175,0 64.95263,0 0,-6.666602 0,-13.333208 0,-19.999811 -50.00005,0 -100.000099,0 -150.000146,0 z"
7374
/>
7475
<path
@@ -85,7 +86,7 @@ function ScrollyElements(
8586
x={getVal(text1Xs)}
8687
y={getVal(text1Ys)}
8788
fontSize={textSize}
88-
fill="white">
89+
fill="var(--color-text)">
8990
{/* cSpell:ignore oshua */}
9091
{getVal([0, 1]) > 0.5 ? "oshua" : ""}
9192
</text>

src/pages/about/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export default function About(): JSX.Element {
7878
className={styles.pdf}
7979
aria-label="Open as PDF"
8080
title="Open as PDF">
81-
<svg viewBox="0 0 1920 1920" xmlns="http://www.w3.org/2000/svg">
81+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1920">
8282
<g>
8383
<path d="M1251.654 0c44.499 0 88.207 18.07 119.718 49.581l329.223 329.224c31.963 31.962 49.581 74.54 49.581 119.717V1920H169V0Zm-66.183 112.941H281.94V1807.06h1355.294V564.706H1185.47V112.94Zm112.94 23.379v315.445h315.445L1298.412 136.32Z" />
8484
<path d="M900.497 677.67c26.767 0 50.372 12.65 67.991 37.835 41.901 59.068 38.965 121.976 23.492 206.682-5.308 29.14.113 58.617 16.263 83.125 22.814 34.786 55.68 82.673 87.981 123.219 23.718 29.93 60.198 45.854 97.13 40.885 23.718-3.276 52.292-5.986 81.656-5.986 131.012 0 121.186 46.757 133.045 89.675 6.55 25.976 3.275 48.678-10.165 65.506-16.715 22.701-51.162 34.447-101.534 34.447-55.793 0-74.202-9.487-122.767-24.96-27.445-8.81-55.906-10.617-83.69-3.275-55.453 14.456-146.936 36.48-223.284 46.983-40.772 5.647-77.816 26.654-102.438 60.875-55.454 76.8-106.842 148.518-188.273 148.518-21.007 0-40.32-7.567-56.244-22.701-23.492-23.492-33.544-49.581-28.574-79.85 13.778-92.95 128.075-144.79 196.066-182.625 16.037-8.923 28.687-22.589 36.592-39.53l107.86-233.223c7.68-16.377 10.051-34.56 7.228-52.518-12.537-79.059-31.06-211.99 18.748-272.075 10.955-13.44 26.09-21.007 42.917-21.007Zm20.556 339.953c-43.257 126.607-119.718 264.282-129.996 280.32 92.273-43.37 275.916-65.28 275.916-65.28-92.386-88.998-145.92-215.04-145.92-215.04Z" />

src/pages/tools/color-converter/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ function CopiableColor({ colorString }: { readonly colorString: string }) {
120120
<code>{colorString}</code>
121121
{copied ? (
122122
<svg
123+
xmlns="http://www.w3.org/2000/svg"
123124
viewBox="0 0 24 24"
124125
fill="none"
125-
xmlns="http://www.w3.org/2000/svg"
126126
className={styles.copyIcon}>
127127
<path
128128
d="M4.89163 13.2687L9.16582 17.5427L18.7085 8"
@@ -134,9 +134,9 @@ function CopiableColor({ colorString }: { readonly colorString: string }) {
134134
</svg>
135135
) : (
136136
<svg
137+
xmlns="http://www.w3.org/2000/svg"
137138
viewBox="0 0 24 24"
138139
fill="none"
139-
xmlns="http://www.w3.org/2000/svg"
140140
className={styles.copyIcon}>
141141
<path
142142
fillRule="evenodd"

0 commit comments

Comments
 (0)