Skip to content

Commit c961dc2

Browse files
authored
refactor(styles): replace Sass with plain CSS and Tailwind @apply (#8159)
1 parent d2a9852 commit c961dc2

File tree

12 files changed

+226
-476
lines changed

12 files changed

+226
-476
lines changed

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"*.{md,mdx}": [
6565
"npm run lint:markdown"
6666
],
67-
"*.{js,mjs,jsx,css,scss,md,mdx,json}": [
67+
"*.{js,mjs,jsx,css,md,mdx,json}": [
6868
"prettier --write"
6969
]
7070
},
@@ -133,7 +133,6 @@
133133
"mdast-util-to-string": "^4.0.0",
134134
"mini-css-extract-plugin": "^2.10.1",
135135
"mkdirp": "^3.0.1",
136-
"modularscale-sass": "^3.0.3",
137136
"npm-run-all": "^4.1.1",
138137
"postcss": "^8.5.8",
139138
"postcss-loader": "^8.2.0",
@@ -150,8 +149,6 @@
150149
"remark-gfm": "^4.0.1",
151150
"remark-html": "^16.0.1",
152151
"rimraf": "^6.1.2",
153-
"sass": "^1.97.3",
154-
"sass-loader": "^16.0.6",
155152
"sirv-cli": "^3.0.1",
156153
"sitemap-static": "^0.4.2",
157154
"static-site-generator-webpack-plugin": "^3.4.1",

src/components/Site/Site.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import Splash from "../Splash/Splash.jsx";
4040
import Sponsors from "../Sponsors/Sponsors.jsx";
4141

4242
// Load Styling
43-
import "../../styles/index.scss";
43+
import "../../styles/index.css";
4444

4545
// Load Content Tree
4646

src/styles/dark.css

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
@reference "tailwindcss";
2+
3+
[data-theme="dark"] {
4+
body {
5+
@apply bg-[#121212] text-[#e0e0e0];
6+
}
7+
8+
.splash__section--dark {
9+
@apply bg-[#202020];
10+
}
11+
12+
.markdown {
13+
h1,
14+
h2,
15+
h3,
16+
h4,
17+
h5,
18+
h6 {
19+
@apply text-[#9ab3c0];
20+
}
21+
22+
code,
23+
tt {
24+
text-shadow: none;
25+
@apply bg-[rgba(70,94,105,0.45)];
26+
}
27+
28+
blockquote {
29+
@apply border-l-[#343434] text-[#a3a3a3];
30+
}
31+
32+
blockquote.tip {
33+
@apply bg-[#192429] text-[#7da2b4];
34+
}
35+
36+
blockquote.warning {
37+
@apply bg-[#27220a] text-[#a49d83];
38+
}
39+
40+
blockquote.todo {
41+
@apply bg-[#402b1f] text-[#998478];
42+
}
43+
44+
hr {
45+
@apply bg-[#343434];
46+
}
47+
48+
th {
49+
@apply bg-[#121212] border-[#252525];
50+
}
51+
52+
tr,
53+
tr:last-child {
54+
@apply border-[#252525];
55+
}
56+
57+
tr:nth-child(2n) {
58+
@apply bg-[#202020];
59+
}
60+
61+
td {
62+
@apply border-[#252525];
63+
}
64+
65+
pre {
66+
@apply bg-[#131b1f];
67+
68+
code {
69+
@apply bg-transparent;
70+
}
71+
}
72+
73+
a code {
74+
@apply text-[#69a8ee];
75+
76+
&:hover {
77+
@apply text-[#82b7f6];
78+
}
79+
}
80+
81+
aside.tip,
82+
aside.warning,
83+
aside.preview,
84+
aside.todo {
85+
@apply bg-[#222222] text-white;
86+
}
87+
88+
aside.tip > .tip__prefix,
89+
aside.warning > .warning__prefix,
90+
aside.preview > .preview__prefix,
91+
aside.todo > .todo__prefix {
92+
@apply text-white;
93+
}
94+
}
95+
96+
.gitter__button {
97+
@apply bg-[#1c3b39];
98+
}
99+
100+
.sponsors__content,
101+
.footer__inner {
102+
@apply border-[#252525];
103+
}
104+
105+
.page-links__gap {
106+
@apply text-gray-300;
107+
}
108+
109+
.site {
110+
background: #121212 !important;
111+
}
112+
113+
.sidebar__docs-version {
114+
@apply border-[#252525] text-[#b8b8b8];
115+
}
116+
117+
.contributor .contributor__name {
118+
@apply bg-[#121212] text-[#9ab3c0];
119+
}
120+
121+
.placeholder h2,
122+
.placeholder p {
123+
@apply bg-[#252525];
124+
125+
&:after {
126+
background: linear-gradient(90deg, #252525, #121212, #252525);
127+
}
128+
}
129+
130+
.footer-openjsf-logo {
131+
@apply invert;
132+
}
133+
134+
.footer p {
135+
@apply text-white;
136+
}
137+
}
138+
139+
@layer base {
140+
[data-theme="dark"] a,
141+
[data-theme="dark"] button.as-link {
142+
@apply text-[#69a8ee];
143+
}
144+
}
145+
146+
@layer base {
147+
[data-theme="dark"] a:hover {
148+
@apply text-[#82b7f6];
149+
}
150+
}

src/styles/dark.scss

Lines changed: 0 additions & 150 deletions
This file was deleted.

0 commit comments

Comments
 (0)