|
| 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