Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

๐Ÿ› ๏ธ fonts ๋””์ฝ”๋”ฉ ์ด์Šˆ ํ•ด๊ฒฐ #37

Merged
merged 2 commits into from
May 7, 2024

Conversation

Legitgoons
Copy link
Member

@Legitgoons Legitgoons commented May 7, 2024

์ž‘์—… ์ด์œ 

#36 fonts ๋””์ฝ”๋”ฉ ์ด์Šˆ ํ•ด๊ฒฐ


์ž‘์—… ์‚ฌํ•ญ

  • weight๋ฅผ ์ˆซ์ž๋กœ ๋ณ€๊ฒฝํ•˜๋ฉฐ font file์„ ์ •์ƒ์ ์œผ๋กœ ๋ถˆ๋Ÿฌ์˜ค์ง€ ๋ชปํ–ˆ์Šต๋‹ˆ๋‹ค.
@mixin font-style($weight, $size, $line-height) {
  font-weight: $weight;
//...
  @font-face {
    font-family: 'Pretendard';
    src:
      url('/assets/font/pretendard-#{$weight}-subset.woff2') format('woff2'), 
      url('/assets/font/pretendard-#{$weight}-subset.woff') format('woff');
  }
}

.h1bold { @include font-style(700, 1.5, 31px); } //$weight์— ์ˆซ์ž๊ฐ€ ๋“ค์–ด๊ฐ€๋ฉฐ ์—๋Ÿฌ ๋ฐœ์ƒ
  • ์ˆซ์ž๋Š” weight-number, url ๋งํฌ์— ๋“ค์–ด๊ฐˆ ๋‹จ์–ด๋Š” weight๋กœ ๋‘˜ ๋‹ค ๋ณ‘๊ธฐํ•˜๋„๋ก ์ฒ˜๋ฆฌํ–ˆ์Šต๋‹ˆ๋‹ค.
@mixin font-style($weight-number, $weight, $size, $line-height) {
  font-weight: $weight-number;
//...
.h1bold { @include font-style(700, 'bold', 1.5, 31px); }

image


๋ฆฌ๋ทฐ์–ด๊ฐ€ ์ค‘์ ์ ์œผ๋กœ ํ™•์ธํ•ด์•ผ ํ•˜๋Š” ๋ถ€๋ถ„

  • ์ •์ƒ์ ์œผ๋กœ font๋ฅผ ๋ถˆ๋Ÿฌ์˜ค๊ณ  ์žˆ๋‚˜์š”?

๋ฐœ๊ฒฌํ•œ ์ด์Šˆ

x

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

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-37.d37mn03xh3qyyz.amplifyapp.com

Copy link
Collaborator

@BangDori BangDori left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค!

src/app/styles/_fonts.scss Show resolved Hide resolved
@Legitgoons Legitgoons merged commit 8bf98cb into main May 7, 2024
2 checks passed
@Legitgoons Legitgoons deleted the fix/issue-36-fonts branch May 7, 2024 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants