Skip to content

Commit

Permalink
๐Ÿ› ๏ธ fonts ๋””์ฝ”๋”ฉ ์ด์Šˆ ํ•ด๊ฒฐ (#37)
Browse files Browse the repository at this point in the history
* fix: _fonts.scss ๋””์ฝ”๋”ฉ ์ด์Šˆ ํ•ด๊ฒฐ

weight๋ฅผ ์ˆซ์ž๋กœ ๋ณ€๊ฒฝํ•˜๋ฉฐ font file์„ ์ •์ƒ์ ์œผ๋กœ ๋ถˆ๋Ÿฌ์˜ค์ง€ ๋ชปํ–ˆ์Šต๋‹ˆ๋‹ค.
์ˆซ์ž๋Š” weight-number, ๋ฌธ์ž๋Š” weight๋กœ ๋‘˜ ๋‹ค ๋ณ‘๊ธฐํ•˜๋„๋ก ์ฒ˜๋ฆฌํ–ˆ์Šต๋‹ˆ๋‹ค.

* feat: _fonts.scss font-face๋‚ด font-weight ์‚ญ์ œ
  • Loading branch information
Legitgoons authored May 7, 2024
1 parent 414e44b commit 8bf98cb
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions src/app/styles/_fonts.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@mixin font-style($weight, $size, $line-height) {
@mixin font-style($weight-number, $weight, $size, $line-height) {
font-family: 'Pretendard', sans-serif;
font-weight: $weight;
font-weight: $weight-number;
font-size: $size * 1rem;
letter-spacing: -0.03rem;
line-height: $line-height;
Expand All @@ -10,38 +10,37 @@
src:
url('/assets/font/pretendard-#{$weight}-subset.woff2') format('woff2'),
url('/assets/font/pretendard-#{$weight}-subset.woff') format('woff');
font-weight: $weight;
font-style: normal;
}
}

/* 24px */
.h1bold { @include font-style(700, 1.5, 31px); }
.h1semi { @include font-style(600, 1.5, 31px); }
.h1bold { @include font-style(700, 'bold', 1.5, 31px); }
.h1semi { @include font-style(600, 'semibold', 1.5, 31px); }

/* 20px */
.h2semi { @include font-style(600, 1.25, 26px); }
.h2semi { @include font-style(600, 'semibold', 1.25, 26px); }

/* 16px */
.h3bold { @include font-style(700, 1, 22px); }
.h3semi { @include font-style(600, 1, 22px); }
.h3bold { @include font-style(700, 'bold', 1, 22px); }
.h3semi { @include font-style(600, 'semibold', 1, 22px); }

/* 14px */
.h4semi { @include font-style(600, 0.875, 18px); }
.h4md { @include font-style(500, 0.875, 18px); }
.h4semi { @include font-style(600, 'semibold', 0.875, 18px); }
.h4md { @include font-style(500, 'medium', 0.875, 18px); }

/* 12px */
.b1semi { @include font-style(600, 0.75, 16px); }
.b1md { @include font-style(500, 0.75, 16px); }
.b1reg { @include font-style(400, 0.75, 17px); }
.b1semi { @include font-style(600, 'semibold', 0.75, 16px); }
.b1md { @include font-style(500, 'medium', 0.75, 16px); }
.b1reg { @include font-style(400, 'regular', 0.75, 17px); }

/* 11px */
.b2md { @include font-style(500, 0.6875, 14px); }
.b2semi { @include font-style(600, 0.6875, 14px); }
.b2reg { @include font-style(400, 0.6875, 14px); }
.b2md { @include font-style(500, 'medium', 0.6875, 14px); }
.b2semi { @include font-style(600, 'semibold', 0.6875, 14px); }
.b2reg { @include font-style(400, 'regular', 0.6875, 14px); }

/* 9px */
.b3md { @include font-style(500, 0.5625, 12px); }
.b3md { @include font-style(500, 'medium', 0.5625, 12px); }

/* 8px */
.b4md { @include font-style(500, 0.5, 10px); }
.b4md { @include font-style(500, 'medium', 0.5, 10px); }

0 comments on commit 8bf98cb

Please sign in to comment.