Skip to content

Commit 706e822

Browse files
committed
Discontinue usage of Sass
1 parent 14f150e commit 706e822

File tree

5 files changed

+76
-627
lines changed

5 files changed

+76
-627
lines changed

ui/frontend/index.module.css

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
:root {
2+
--primary-font: 'Open Sans', sans-serif;
3+
--rust: #a42;
4+
--rust-dark: #80331a;
5+
--border-color: #bbb;
6+
--border: 1px solid var(--border-color);
7+
--header-main-border: #dedede;
8+
--header-transition: 0.2s ease-in-out;
9+
--header-tint: #428bca;
10+
--header-border-radius: 4px;
11+
--header-accent-border: #bdbdbd;
12+
}
13+
14+
/* Modify normalized styles */
15+
button,
16+
input,
17+
optgroup,
18+
select,
19+
textarea {
20+
font-family: var(--primary-font);
21+
}
22+
23+
html {
24+
box-sizing: border-box;
25+
}
26+
27+
*,
28+
*::before,
29+
*::after {
30+
box-sizing: inherit;
31+
}
32+
33+
body {
34+
padding: 0 1em;
35+
background-color: #e1e1db;
36+
font-family: var(--primary-font);
37+
}
38+
39+
:global(.language-rust_errors) {
40+
& :global(.warning) {
41+
color: #f79a06;
42+
}
43+
44+
& :global(.error) {
45+
color: #bf1b1b;
46+
}
47+
}

ui/frontend/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import 'core-js';
22
import 'regenerator-runtime/runtime';
33

4+
import 'normalize.css/normalize.css';
5+
import './index.module.css';
6+
47
import { merge } from 'lodash';
58
import React from 'react';
69
import ReactDOM from 'react-dom';

ui/frontend/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,12 @@
5858
"jest": "^26.0.0",
5959
"json-loader": "^0.5.4",
6060
"mini-css-extract-plugin": "^1.3.9",
61-
"node-sass": "^5.0.0",
6261
"normalize.css": "^8.0.0",
6362
"postcss": "^8.2.7",
6463
"postcss-loader": "^5.0.0",
6564
"postcss-nesting": "^7.0.1",
6665
"postcss-simple-vars": "^6.0.3",
6766
"prettier": "2.2.1",
68-
"sass-loader": "^11.0.1",
6967
"style-loader": "^2.0.0",
7068
"stylelint": "^13.12.0",
7169
"stylelint-config-css-modules": "^2.2.0",

ui/frontend/webpack.config.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ module.exports = function(_, argv) {
4545
"[path][name]__[local]--[hash:base64]";
4646

4747
return {
48-
entry: {
49-
app: ['./index.tsx', './index.scss'],
50-
},
48+
entry: './index.tsx',
5149

5250
devtool,
5351

@@ -83,20 +81,21 @@ module.exports = function(_, argv) {
8381
use: ['babel-loader', 'ts-loader'],
8482
},
8583
{
86-
test: /\.scss$/,
84+
test: /prismjs\/themes\/.*css$/,
85+
type: 'asset/resource',
86+
},
87+
{
88+
test: /\.css$/,
89+
include: /node_modules/,
8790
use: [
8891
MiniCssExtractPlugin.loader,
8992
"css-loader",
9093
"postcss-loader",
91-
"sass-loader",
9294
],
9395
},
94-
{
95-
test: /prismjs\/themes\/.*css$/,
96-
type: 'asset/resource',
97-
},
9896
{
9997
test: /\.module.css$/,
98+
exclude: /node_modules/,
10099
use: [
101100
MiniCssExtractPlugin.loader,
102101
{

0 commit comments

Comments
 (0)