Skip to content

Commit 008978f

Browse files
authored
fix: convert scss to css (#759)
* fix: convert scss to css * refactor: apply PR feedbacks
1 parent 65a835f commit 008978f

File tree

91 files changed

+1014
-1749
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+1014
-1749
lines changed

apps/calendar/.storybook/main.js

+3-22
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,12 @@
11
const path = require('path');
22
const postcssPrefixer = require('postcss-prefixer');
33
const prefix = 'toastui-calendar-';
4+
const custom = require('../webpack.dev.config.js')({}, {});
45

56
module.exports = {
6-
stories: ['../stories/**/*.stories.@(ts|tsx)'],
7+
stories: ['@stories/**/*.stories.@(ts|tsx)'],
78
webpackFinal: async (config) => {
8-
config.module.rules.push({
9-
test: /\.(ts|tsx)$/,
10-
use: [
11-
{
12-
loader: require.resolve('ts-loader'),
13-
},
14-
],
15-
});
16-
17-
config.module.rules.push({
18-
test: /\.s[ac]ss$/i,
19-
use: [
20-
'style-loader',
21-
'css-loader',
22-
{
23-
loader: 'postcss-loader',
24-
options: { plugins: [postcssPrefixer({ prefix })] },
25-
},
26-
'sass-loader',
27-
],
28-
});
9+
config.module.rules = custom.module.rules;
2910

3011
config.resolve.alias = {
3112
...config.resolve.alias,

apps/calendar/.storybook/preview.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import '../src/sass/index.scss';
1+
import '@src/css/index.css';

apps/calendar/babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
shippedProposals: true,
99
},
1010
],
11-
'@babel/preset-typescript',
11+
['@babel/preset-typescript', { jsxPragma: 'h' }],
1212
'@babel/preset-react',
1313
],
1414
plugins: [

apps/calendar/package-lock.json

+781-1,393
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/calendar/package.json

+3-7
Original file line numberDiff line numberDiff line change
@@ -93,22 +93,18 @@
9393
"karma-webpack": "^3.0.0",
9494
"mini-css-extract-plugin": "^0.9.0",
9595
"moment-timezone": "^0.5.27",
96-
"node-sass": "^4.12.0",
9796
"optimize-css-assets-webpack-plugin": "^5.0.3",
98-
"postcss-loader": "^3.0.0",
97+
"postcss-loader": "^4.2.0",
9998
"postcss-prefixer": "^2.1.1",
10099
"preact": "^10.3.2",
101100
"preact-markup": "^2.1.1",
102101
"preact-render-to-string": "^5.1.0",
103102
"prettier": "^2.2.1",
104-
"safe-umd-webpack-plugin": "^4.0.0",
105-
"sass-loader": "^8.0.0",
106103
"storybook": "^6.1.18",
107104
"style-loader": "^1.0.0",
108-
"stylelint": "^13.11.0",
105+
"stylelint": "^13.12.0",
109106
"stylelint-config-recommended": "^3.0.0",
110-
"stylelint-scss": "^3.11.0",
111-
"stylelint-webpack-plugin": "^0.10.5",
107+
"stylelint-webpack-plugin": "^2.1.1",
112108
"terser-webpack-plugin": "^2.3.4",
113109
"timezone-mock": "^1.0.16",
114110
"ts-loader": "^8.0.17",

apps/calendar/src/css/common.css

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.holiday {
2+
color: red;
3+
font-size: 15px;
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.event-background { position: absolute; }
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@import './background.css';
2+
@import './time.css';
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
.event-time {
22
position: absolute;
33
overflow: hidden;
4-
54
cursor: pointer;
6-
7-
.travel-time,
8-
.event-time-content {
9-
overflow: hidden;
10-
padding: 1px 0 0 3px;
11-
font-size: 12px;
12-
}
135
}
14-
6+
.event-time .travel-time,
7+
.event-time .event-time-content {
8+
overflow: hidden;
9+
padding: 1px 0 0 3px;
10+
font-size: 12px;
11+
}
1512
.resize-handler-x {
1613
position: absolute;
1714
right: 0;
@@ -21,6 +18,5 @@
2118
text-align: center;
2219
color: #fff;
2320
cursor: row-resize;
24-
25-
background: url(./image/handler-x.png) no-repeat center center;
21+
background: url("../image/handler-x.png") no-repeat center center;
2622
}

apps/calendar/src/css/icons.css

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.icon {
2+
width: 14px;
3+
height: 14px;
4+
display: inline-block;
5+
vertical-align: middle;
6+
}
7+
.icon.ic-title { background: url("./image/ic-subject.png") no-repeat; }
8+
.icon.ic-location { background: url("./image/ic-location.png") no-repeat; }
9+
.icon.ic-date { background: url("./image/ic-date.png") no-repeat; }
10+
.icon.ic-state { background: url("./image/ic-state.png") no-repeat; }
11+
.icon.ic-private { background: url("/image/ic-lock.png") no-repeat; }
12+
.icon.ic-public { background: url("./image/ic-unlock.png") no-repeat; }
13+
.icon.ic-close { background: url("./image/ic-close.png") no-repeat; }
14+
.icon.ic-user-b { background-image: url("./image/ic-user-b.png"); }
15+
.icon.ic-edit { background-image: url("./image/ic-edit.png"); }
16+
.icon.ic-delete { background-image: url("./image/ic-delete.png"); }
17+
.icon.ic-arrow-solid-top { background: url("./image/ic-arrow-solid-top.png") no-repeat; }
18+
.icon.ic-milestone { background: url("./image/ic-milestone.png") no-repeat; }
19+
.icon.ic-arrow-left { background: url("./image/ic-arrow-left.png") no-repeat; }
20+
.icon.ic-arrow-right { background: url("./image/ic-arrow-right.png") no-repeat; }
21+
22+
.ic-location-b { background: url("./image/ic-location-b.png"); }
23+
24+
.ic-state-b { background: url("./image/ic-state-b.png"); }
25+
26+
.ic-repeat-b { background: url("./image/ic-repeat-b.png"); }

apps/calendar/src/css/index.css

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@import './common.css';
2+
@import './layout.css';
3+
@import './icons.css';
4+
@import './timegrid/index.css';
5+
@import './events/index.css';

apps/calendar/src/css/layout.css

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.layout {
2+
box-sizing: border-box;
3+
position: relative;
4+
white-space: nowrap;
5+
}
6+
.layout * { box-sizing: border-box; }
7+
.layout .panel-resizer { user-select: none; }
8+
.layout .panel-resizer:hover { border-color: #999; }
9+
.layout .panel-resizer-guide { position: absolute; }
10+
.layout .dragging { position: absolute; }
11+
12+
.layout.horizontal .panel,
13+
.layout.horizontal .panel-resizer,
14+
.layout.horizontal .draggable {
15+
display: inline-block;
16+
vertical-align: middle;
17+
}
+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
.column {
2+
position: relative;
3+
border-right: 1px solid #e5e5e5;
4+
}
5+
.column .gridline {
6+
position: relative;
7+
height: 52px;
8+
border-bottom: 1px solid #e5e5e5;
9+
}
10+
.column .gridline .gridline-half {
11+
position: absolute;
12+
width: 100%;
13+
height: 26px;
14+
border-bottom: 1px dotted #f9f9f9;
15+
}
16+
.column .guide-creation {
17+
position: absolute;
18+
right: 10px;
19+
left: 1px;
20+
padding: 3px;
21+
background-color: rgba(81, 92, 230, 0.05);
22+
border: 1px solid #515ce6;
23+
}
24+
.column .guide-creation .creation-label {
25+
color: #515ce6;
26+
font-size: 11px;
27+
font-weight: bold;
28+
}
29+
.column .guide-creation .creation-label.creation-label-bottom {
30+
position: absolute;
31+
bottom: 3px;
32+
}
33+
.column .events {
34+
position: absolute;
35+
left: 0;
36+
top: 0;
37+
right: 0;
38+
bottom: 0;
39+
}
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@import './times.css';
2+
@import './column.css';
3+
@import './timegrid.css';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
.timegrid {
2+
user-select: none;
3+
position: relative;
4+
height: 100%;
5+
}
6+
.timegrid .timegrid-scroll-area {
7+
overflow: hidden;
8+
overflow-y: auto;
9+
position: relative;
10+
height: 100%;
11+
}
12+
.timegrid .columns {
13+
position: absolute;
14+
top: 0;
15+
right: 0;
16+
}
17+
.timegrid .columns .column { display: inline-block; }
18+
.timegrid .timegrid-current-time-line {
19+
position: absolute;
20+
left: 0;
21+
right: 0;
22+
}
23+
.timegrid .timegrid-current-time-line .timegrid-current-time-line-left {
24+
position: absolute;
25+
}
26+
.timegrid .timegrid-current-time-line .timegrid-current-time-line-marker {
27+
position: absolute;
28+
width: 9px;
29+
height: 9px;
30+
border-radius: 50%;
31+
margin: -4px 0 0 -5px;
32+
}
33+
.timegrid .timegrid-current-time-line .timegrid-current-time-line-today {
34+
position: absolute;
35+
}
36+
.timegrid .timegrid-current-time-line .timegrid-current-time-line-right {
37+
position: absolute;
38+
right: 0;
39+
}
40+
.timegrid-sticky {
41+
position: absolute;
42+
top: 0;
43+
border-bottom: 1px solid #e5e5e5;
44+
background-color: white;
45+
font-size: 11px;
46+
user-select: none;
47+
}
48+
.timegrid-sticky .timegrid-timezone-label {
49+
display: inline-block;
50+
text-align: right;
51+
padding-right: 5px;
52+
border-right: 1px solid #e5e5e5;
53+
height: 40px;
54+
line-height: 40px;
55+
}
56+
.timegrid-sticky .timegrid-collapse-button {
57+
cursor: pointer;
58+
position: absolute;
59+
text-align: center;
60+
background-color: #fff;
61+
border: 1px solid #ddd;
62+
top: 2px;
63+
bottom: 2px;
64+
width: 10px;
65+
border-left: none;
66+
}
67+
.timegrid-sticky .timegrid-collapse-button .icon {
68+
width: 5px;
69+
}
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.timegrid-times {
2+
display: inline-block;
3+
position: relative;
4+
border-right: 1px solid #e5e5e5;
5+
font-size: 11px;
6+
}
7+
.timegrid-times .timegrid-time {
8+
height: 52px;
9+
text-align: right;
10+
position: relative;
11+
line-height: 52px;
12+
top: -26px;
13+
right: 5px;
14+
color: #333;
15+
}
16+
.timegrid-times .timegrid-time.timegrid-time-past {
17+
color: #bbb;
18+
}
19+
.timegrid-times .timegrid-time.timegrid-time-first {
20+
top: 5px;
21+
line-height: normal;
22+
}
23+
.timegrid-times .timegrid-time.timegrid-time-last {
24+
height: 0;
25+
top: -36px;
26+
}
27+
.timegrid-times .timegrid-time-hidden {
28+
visibility: hidden;
29+
}
30+
.timegrid-times .timegrid-current-time {
31+
position: absolute;
32+
text-align: right;
33+
right: 5px;
34+
color: #515ce6;
35+
}

apps/calendar/src/sass/events/background.scss

-3
This file was deleted.

apps/calendar/src/sass/events/index.scss

-2
This file was deleted.

apps/calendar/src/sass/icons.scss

-73
This file was deleted.

0 commit comments

Comments
 (0)