diff --git a/src/global-style.ts b/src/global-style.ts deleted file mode 100644 index f9991ff1..00000000 --- a/src/global-style.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { createGlobalStyle } from "styled-components"; -import { normalize } from "styled-normalize"; - -const GlobalStyle = createGlobalStyle` - ${normalize} - html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, -menu, nav, output, ruby, section, summary, -time, mark, audio, video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - vertical-align: baseline; -} -/* HTML5 display-role reset for older browsers */ -article, aside, details, figcaption, figure, -footer, header, hgroup, menu, nav, section { - display: block; -} -body { - margin: 0; - padding: 0; - display: flex; - justify-content: center; - align-items: center; - font-family: 'Pretendard-Regular'; - overflow: hidden; - scroll-behavior: smooth; - background-color: #e8e8e8; - max-width: 100vw; - height: 100vh; - } - - #root { - display: flex; - justify-content: center; - align-items: center; - width: 100%; - background-color: white; - max-width: 480px; - min-width: 375px; - padding: 0 25px; - height: 100%; - } -ol, ul { - list-style: none; -} -blockquote, q { - quotes: none; -} -blockquote:before, blockquote:after, -q:before, q:after { - content: ''; - content: none; -} -table { - border-collapse: collapse; - border-spacing: 0; -} -*{ - box-sizing: border-box; - font-family: "Pretendard"; -} -a{ - text-decoration:none; - color:inherit; -} -*::-webkit-scrollbar { - width: 8px; /* 스크롤바의 너비 */ -} -*::-webkit-scrollbar-thumb { - height: 30%; /* 스크롤바의 길이 */ - background: gray; /* 스크롤바의 색상 */ - border-radius: 10px; -} -*::-webkit-scrollbar-track { - background: rgba(33, 122, 244, .1); /*스크롤바 뒷 배경 색상*/ -} -*::-webkit-scrollbar-corner{ - background: transparent; -} -.ql-align-right{ - display: flex; - justify-content: flex-end; -} -.ql-align-center{ - display: flex; - justify-content: center; -} - -`; -export default GlobalStyle; diff --git a/src/main.tsx b/src/main.tsx index 4c677d31..419959d2 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,7 +1,7 @@ import { StrictMode } from "react"; import { createRoot } from "react-dom/client"; import App from "./App"; -import GlobalStyle from "./global-style"; +import GlobalStyle from "../src/style/global-style"; createRoot(document.getElementById("root")!).render( diff --git a/src/style/global-style.ts b/src/style/global-style.ts index c12b70c9..977bee38 100644 --- a/src/style/global-style.ts +++ b/src/style/global-style.ts @@ -1,17 +1,15 @@ -import { createGlobalStyle } from 'styled-components'; -import theme from './theme'; -import './normalize.css'; -import './fonts.css'; +import { createGlobalStyle } from "styled-components"; +import theme from "./theme"; +import "./normalize.css"; +import "./fonts.css"; const GlobalStyle = createGlobalStyle` :root { font-family: 'Pretendard Variable', 'Pretendard', '-apple-system', 'BlinkMacSystemFont', 'system-ui', 'Roboto', 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'sans-serif'; - width: 100%; - height: 100%; color: ${theme.colors.black100}; - background-color: ${theme.colors.white}; + background-color: ${theme.colors.gray100}; } * { @@ -19,7 +17,6 @@ const GlobalStyle = createGlobalStyle` scrollbar-width: none; -ms-overflow-style: none; font-family: inherit; - -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; @@ -31,11 +28,24 @@ const GlobalStyle = createGlobalStyle` box-sizing: border-box !important; } - html, - body { + html{ margin: 0; - padding: 0; + padding: 0; + border: 0; + display: flex; + justify-content: center; +} + body { + width: 100%; + height: 100%; + padding: 0 25px; overscroll-behavior: none; + background-color: ${theme.colors.white}; + max-width: ${theme.size.maxWidth}; + min-width: ${theme.size.minWidth}; + margin: 0; + display: flex; + justify-content: center; } a { diff --git a/src/style/normalize.css b/src/style/normalize.css index bbf5e46b..b8737bc3 100644 --- a/src/style/normalize.css +++ b/src/style/normalize.css @@ -197,9 +197,9 @@ select { */ button, -[type='button'], -[type='reset'], -[type='submit'] { +[type="button"], +[type="reset"], +[type="submit"] { -webkit-appearance: button; } @@ -208,9 +208,9 @@ button, */ button::-moz-focus-inner, -[type='button']::-moz-focus-inner, -[type='reset']::-moz-focus-inner, -[type='submit']::-moz-focus-inner { +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { border-style: none; padding: 0; } @@ -220,9 +220,9 @@ button::-moz-focus-inner, */ button:-moz-focusring, -[type='button']:-moz-focusring, -[type='reset']:-moz-focusring, -[type='submit']:-moz-focusring { +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { outline: 1px dotted ButtonText; } @@ -271,8 +271,8 @@ textarea { * 2. Remove the padding in IE 10. */ -[type='checkbox'], -[type='radio'] { +[type="checkbox"], +[type="radio"] { box-sizing: border-box; /* 1 */ padding: 0; /* 2 */ } @@ -281,8 +281,8 @@ textarea { * Correct the cursor style of increment and decrement buttons in Chrome. */ -[type='number']::-webkit-inner-spin-button, -[type='number']::-webkit-outer-spin-button { +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { height: auto; } @@ -291,7 +291,7 @@ textarea { * 2. Correct the outline style in Safari. */ -[type='search'] { +[type="search"] { -webkit-appearance: textfield; /* 1 */ outline-offset: -2px; /* 2 */ } @@ -300,7 +300,7 @@ textarea { * Remove the inner padding in Chrome and Safari on macOS. */ -[type='search']::-webkit-search-decoration { +[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }