Skip to content

Commit d050b80

Browse files
committed
Compress common css
1 parent 519924f commit d050b80

File tree

1 file changed

+28
-12
lines changed

1 file changed

+28
-12
lines changed

src/components/head/CommonCss.tsx

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,35 @@
11
import React from "react";
22

33
const CommonCss = () => {
4-
return (
5-
<style>
6-
{`
7-
:where(.w-full) { width: 100%; }
8-
:where(.flex) { display: flex; }
9-
:where(.items-center) { align-items: center; }
10-
:where(.justify-center) { justifiy-content: center }
4+
const css = `
5+
:where(.w-full) {
6+
width: 100%;
7+
}
8+
9+
:where(.flex) {
10+
display: flex;
11+
}
12+
13+
:where(.items-center) {
14+
align-items: center;
15+
}
1116
12-
13-
details>summary { list-style: none; }
14-
details>summary::-webkit-details-marker { display: none; }
15-
`}
16-
</style>
17+
:where(.justify-center) {
18+
justifiy-content: center
19+
}
20+
21+
details > summary {
22+
list-style: none;
23+
}
24+
details > summary::-webkit-details-marker {
25+
display: none;
26+
}
27+
28+
`.replace(/\s*\n*\t*/gm, "");
29+
return (
30+
<style dangerouslySetInnerHTML={{
31+
__html: css
32+
}} />
1733
);
1834
};
1935

0 commit comments

Comments
 (0)