Skip to content

Commit d3ea2a2

Browse files
committed
feat: reset css 적용
1 parent 01e4106 commit d3ea2a2

File tree

2 files changed

+82
-1
lines changed

2 files changed

+82
-1
lines changed

packages/notion-to-jsx/src/components/Renderer/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ import { container } from './styles.css';
55
import { NotionBlock } from '../../types';
66
import testData from '../../constants/test.json';
77
import { useKeyboardNavigation } from '../../hooks/useKeyboardNavigation';
8-
import { darkTheme, lightTheme } from '../../styles/theme.css';
98
import { List, ListBlocksRenderer } from './components/List';
109
import { BlockRenderer } from './components/Block';
10+
import '../../styles/reset.css';
11+
import { darkTheme, lightTheme } from '../../styles/theme.css';
1112

1213
const notion = {
1314
getPageBlocks: async () => {
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
import { globalStyle } from '@vanilla-extract/css';
2+
3+
// 모든 요소에 대한 기본 설정
4+
globalStyle('*', {
5+
margin: 0,
6+
padding: 0,
7+
boxSizing: 'border-box',
8+
});
9+
10+
globalStyle('*::before, *::after', {
11+
boxSizing: 'border-box',
12+
});
13+
14+
// HTML과 body 요소
15+
globalStyle('html, body', {
16+
height: '100%',
17+
fontFamily: 'ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif',
18+
WebkitTextSizeAdjust: '100%',
19+
});
20+
21+
// 텍스트 관련 요소
22+
globalStyle('body', {
23+
lineHeight: 1.5,
24+
WebkitFontSmoothing: 'antialiased',
25+
MozOsxFontSmoothing: 'grayscale',
26+
});
27+
28+
// 헤딩 요소
29+
globalStyle('h1, h2, h3, h4, h5, h6', {
30+
fontSize: 'inherit',
31+
fontWeight: 'inherit',
32+
});
33+
34+
// 링크
35+
globalStyle('a', {
36+
color: 'inherit',
37+
textDecoration: 'inherit',
38+
});
39+
40+
// 버튼, 인풋 등의 폼 요소
41+
globalStyle('button, input, optgroup, select, textarea', {
42+
fontFamily: 'inherit',
43+
fontSize: '100%',
44+
lineHeight: 'inherit',
45+
color: 'inherit',
46+
margin: 0,
47+
padding: 0,
48+
});
49+
50+
// 버튼 스타일링
51+
globalStyle('button, [type="button"], [type="reset"], [type="submit"]', {
52+
WebkitAppearance: 'button',
53+
backgroundColor: 'transparent',
54+
backgroundImage: 'none',
55+
});
56+
57+
// 리스트
58+
globalStyle('ol, ul', {
59+
listStyle: 'none',
60+
margin: 0,
61+
padding: 0,
62+
});
63+
64+
// 테이블
65+
globalStyle('table', {
66+
borderCollapse: 'collapse',
67+
borderSpacing: 0,
68+
});
69+
70+
// 이미지
71+
globalStyle('img, svg, video, canvas, audio, iframe, embed, object', {
72+
display: 'block',
73+
verticalAlign: 'middle',
74+
maxWidth: '100%',
75+
});
76+
77+
// 이미지의 border 제거
78+
globalStyle('img', {
79+
borderStyle: 'none',
80+
});

0 commit comments

Comments
 (0)