-
728x90
๐ท CloneTodo โ - Todomate Clone Project | Team CloneMate
CloneTodo : ๋ง์ ์ฌ๋๋ค์ด ์ฌ๋ํ๋ ํฌ๋๋ฉ์ดํธ๋ฅผ ํด๋ก ํ์ฌ ์น ์๋น์ค๋ฅผ ๋ฐฐํฌํด๋ณด๋ ํ๋ก์ ํธ
์๋ฌด๋๋ ๋ธ๋ก๊ทธ๋ฅผ ์์ธํ๊ฒ ์ฐ๋ฉด ์๊ฐ์ ๋ง์ด ๋นผ์๊ธฐ๋๊ฑฐ ๊ฐ์์ ํ ์ผ ์์ฃผ๋ก ๊ฐ๋จํ๊ฒ ์์ฑํด๋ณด๋ ค๊ณ ํ๋ค.
์ด์ ๋ฐค
- ๊ธ์จ์ฒด๋ฅผ ์ ์ฉํ๋ค.
- SCSS๋ก ์ด์ฉํ ์์ ๋ณ์๋ค๋ ์์ ํ๋ค.
1. ํฐํธ ์ ์ฉ
stylesheet ํด๋์ abstracts ํด๋๋ฅผ ์์ฑํ๋ค.
๋ด๋ถ์ ์์ ๋ณ์๋ฅผ ์ฌ์ฉํ๊ธฐ ์ํด_variable.scss ํ์ผ๊ณผ ๋ฏน์ค์ธ์ ์ง์ ํ๋ _mixin.scss ํ์ผ์ ์์ฑํ๋๋ฐ ํ์ฌ๊น์ง๋ ๋ณ์๋ง ์ฌ์ฉํ๊ณ ์๋ค.
๊ทธ๋ฆฌ๊ณ ๊ธ๊ผด๋ ๋ณ์ํ ํ๊ธฐ ์ํด ๋ณ๋๋ก _font.scss ํ์ผ์ ๋ง๋ค์๋ค.
font-face๋ฅผ ์ ์ฉํด์ ์๋์ผ๋ก ํ, ์ ํฐํธ๊ฐ ์ ์ฉ๋๋๋ก ํด๋ณด๋ ค๊ณ ํ๋๋ฐ ์ ์ ์ฉ์ด ์๋์๋ค.
unicode-range | CSS-Tricks
The unicode-range property in CSS is used by the @font-face to define the characters that are supported by the font face.
css-tricks.com
_font.scss ํ์ผ์ ์ด์ฉํด์ scssํ์ผ๋ค์๊ฒ ํฌํจํด์ฃผ๋ ๋ฐฉ์์ผ๋ก ์ฌ์ฉํ๊ณ ์๋๋ฐ ์ด๊ฒ๋ css ๋ณํ ์ ๋งค๋ฒ ๋ถ๋ฌ์ค๋ ๋ฐฉ์์ด๋ผ ๊ทธ๋ฅ index.html ์ <style></style> ํ๊ทธ ๋ง๋ค๊ณ ๋ด๋ถ์ ์ ์ธํด์ ํ๋ฒ์ ์ธ ์ ์๋๋ก ํ๋ ๊ฒ์ด ๋ ๋์ ๋ฐฉ์์ธ ๊ฒ ๊ฐ์์ ๊ณ ๋ฏผ์ด๋ค.
์ ํํ ํฐํธ๋
ํ๊ธ : Pretendard
์๋ฌธ : Hahmelt
์ด๊ณ ์ถํ ๋ณ๊ฒฝ๋ ์ ์์ด ๋ค์ด๋ฐ์ง ์๊ณ ๋๋๋ฅผ ์ด์ฉํด์ font-face๋ฅผ ์ ์ธํ๋ค. (ํ ๋ฒ ๋ค์ด๋ฐ์๋ค๊ฐ ๋๋์์ url ๋ฐ์ฌ ์ ์๋๊ฑฐ ๋ณด๊ณ ์ง์ด๊ฑด ์๋น๋ฐ)
์์ ํ๋ค๊ฐ ํฐํธ๋ npm์ผ๋ก ์ค์นํ ์ ์๋ค๋๊ฑธ ์์๋ค. ์์ง css๋ก ์ด๋ป๊ฒ ์ ์ธํ๋์ง๋ ํ ์คํธ ํด๋ณด์ง ๋ชปํ๋ค.
@font-face { font-family: 'Pretendard'; src: url("https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Thin.woff") format("woff"); font-weight: 100; font-style: normal; } @font-face { font-family: 'Pretendard'; src: url("https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Light.woff") format("woff"); font-weight: 300; font-style: normal; } @font-face { font-family: 'Pretendard'; src: url("https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Regular.woff") format("woff"); font-weight: 400; font-style: normal; } @font-face { font-family: 'Pretendard'; src: url("https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Medium.woff") format("woff"); font-weight: 500; font-style: normal; } @font-face { font-family: 'Pretendard'; src: url("https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-SemiBold.woff") format("woff"); font-weight: 600; font-style: normal; } @font-face { font-family: 'Pretendard'; src: url("https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Bold.woff") format("woff"); font-weight: 700; font-style: normal; } @font-face { font-family: 'Pretendard'; src: url("https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-ExtraBold.woff") format("woff"); font-weight: 800; font-style: normal; } @font-face { font-family: 'Pretendard'; src: url("https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Black.woff") format("woff"); font-weight: 900; font-style: normal; } @font-face { font-family: 'Hahmlet'; src: local(โป), url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2110@1.0/Hahmlet-ExtraBold.woff2") format("woff2"); unicode-range: U+0041-005A, U+0061-007A; font-weight: 800; }
๊ทธ๋์ ์ง๊ธ์ ์๋์ ๊ฐ์ด ์ฝ~๊ฐ ํฌ๋๋ฉ์ดํธ์ ๋น์ทํ๊ฒ ์์ ์ ํด๋ณด๊ณ ์๋ค.
์ฌ๊ธฐ์ ํฌ์ธํธ๋ ์๋ฌธ ํฐํธ๊ฐ ์ด๋ค๊ฑด์ง ์์ง ๋ชป ์ฐพ์๋ค๋ ์ .... ๐
2. ์์ ๋ณ์ ์ ์ฉ
ํฐํธ์ฒ๋ผ ์์๋ ํฌ๋๋ฉ์ดํธ์ ์ ์ฌํ๊ฒ ํ๊ธฐ ์ํด ๊ทธ๋ํฝ ๋๊ตฌ๋ฅผ ์ด์ฉํด์ ํฅ์ฌ์ฝ๋๋ฅผ ๋ฐ์๋ค.
๊ทธ๋ฆฌ๊ณ ํด๋น ํฅ์ฌ์ฝ๋๋ค์ _variables.scss ๋ณ์ ์ ์ธ ์ํธ์ ๋ณ์๋ก ์ ์ธํ๋ค.
// ๋ณ์ ์ ์ธ // ์์ $bg-white: #ffffff; // ๋ฐฐ๊ฒฝ ํฐ์ (default) $main-navbar-gray: #fafafa; // main-navbar bg $goal-btn-gray: #f5f5f5; // main-feed ๋ชฉํ ๋ฒํผ $goal-btn-border-gray: #f3f3f3; // main-feed ๋ชฉํ ๋ฒํผ ํ ๋๋ฆฌ $text-black: #1c1c1c; // ํ ์คํธ $text-gray: #afafaf; // ํ ์คํธ $icon-black: #000000; // ์์ด์ฝ
ํด๋น ์ํธ๋ฅผ ์ฌ์ฉํ๋ SCSS ํ์ผ๋ค์๊ฒ import ์์ผ์ ๋ณ์๋ฅผ ์ฐ๋ฉด ๋๋ค.
@import './abstracts/variables';
์ ๋ ๊ฐ์ง๋ฅผ ์ ์ฉํ App.scss ํ์ผ์ ์ด๋ ๋ค.
@import './abstracts/variables'; @import './abstracts/font'; .App { text-align: center; display: flex; flex-direction: column; flex-wrap: nowrap; justify-content: center; align-items: center; width: 90%; height: 100vh; margin: auto; .header{ width: 90%; margin-bottom: 50px; .main_img{ width: 400px; } h1{ font-family: 'Hahmlet'; } } .start_btn{ width: 90%; button{ width: 80%; font-weight: 400; font-size: 12px; background-color: $goal-btn-gray; &:nth-child(1){ margin-bottom: 1em; } &:hover{ box-shadow: none; } } } }
์ค๋์ ๋ชฉํ๋ฅผ ํด๋ฆญํ๋ฉด ์๋์ Input์ด ๋จ๋๋ก ํ๋ .... ๊ทธ๋ฐ ์ผ์ ํด์ผ ํ๋ค ๐ฅ ํ์ดํ ~!
728x90'WEB Dev > ToyProject' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[ToyProject-Todomate] ํฌ๋๋ฉ์ดํธ ํด๋ก ํ๋ก์ ํธ 36 (0) 2022.02.08 [ToyProject-Todomate] ํฌ๋๋ฉ์ดํธ ํด๋ก ํ๋ก์ ํธ 35 (0) 2022.02.08 [ToyProject-Todomate] ํฌ๋๋ฉ์ดํธ ํด๋ก ํ๋ก์ ํธ 33 (0) 2022.02.01 [ToyProject-Todomate] ํฌ๋๋ฉ์ดํธ ํด๋ก ํ๋ก์ ํธ 32 (0) 2022.01.26 [ToyProject-Todomate] ํฌ๋๋ฉ์ดํธ ํด๋ก ํ๋ก์ ํธ 31 (0) 2022.01.24