Skip to content

Commit 0c4c574

Browse files
authored
Adjust CSS specificity to ensure Japanese font is properly applied - specify font family explicitly (#2778)
<!-- How to write a good PR title: - Follow [the Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/). - Give as much context as necessary and as little as possible - Prefix it with [WIP] while it’s a work in progress --> ## Self Checklist - [x] I wrote a PR title in **English** and added an appropriate **label** to the PR. - [x] I wrote the commit message in **English** and to follow [**the Conventional Commits specification**](https://www.conventionalcommits.org/en/v1.0.0/). - [x] I [added the **changeset**](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md) about the changes that needed to be released. (or didn't have to) - [x] I wrote or updated **documentation** related to the changes. (or didn't have to) - [x] I wrote or updated **tests** related to the changes. (or didn't have to) - [ ] I tested the changes in various browsers. (or didn't have to) - Windows: Chrome, Edge, (Optional) Firefox - macOS: Chrome, Edge, Safari, (Optional) Firefox ## Related Issue - #2776 <!-- Please link to issue if one exists --> <!-- Fixes #0000 --> ## Summary <!-- Please brief explanation of the changes made --> css 적용 우선순위로 인해 일본어일 때 타이포그래피 폰트의 오버라이드가 적용되지 않는 문제를 재수정합니다. ## Details <!-- Please elaborate description of the changes --> - 현재 css 레이어 우선순위는 tokens > base > components 로 설정되어 있습니다. - 토큰을 오버라이드 했던 기존 코드는 base 레이어에서 정의되어 있습니다. - 토큰의 우선순위 상 tokens가 base보다 우선하기 때문에 해당 코드는 동작하지 않았습니다. - [최초 코드](https://github.com/channel-io/bezier-react/pull/2764/changes#diff-d5343edd2cbd4060cb12d851b2ce7b8776194248a36fa05f6a4bf7c9dff9cfdfL19-R22)와 같이 font-family를 명시적으로 설정하는 방향으로 문제를 해결합니다. ### Breaking change? (Yes/No) <!-- If Yes, please describe the impact and migration path for users --> No ## References <!-- Please list any other resources or points the reviewer should be aware of --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## 릴리스 노트 * **버그 수정** * Japanese 폰트가 제대로 적용되도록 CSS 우선순위를 조정했습니다. * 기본 폰트 가족 설정을 개선하여 다언어 폰트 처리를 최적화했습니다. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 2351fcf commit 0c4c574

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.changeset/yellow-lizards-clean.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@channel.io/bezier-react': patch
3+
---
4+
5+
Adjust CSS specificity to ensure Japanese font is properly applied - specify font family explicitly

packages/bezier-react/src/styles/_base.scss

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
:where(:root, :host) {
2-
font-family: var(--typography-text-font-family);
2+
font-family: var(--typography-font-family-sans-kr);
33
font-size: 62.5%; // 10/16 = 0.625. Make REM calculations easier.
44
color: var(--color-text-neutral);
55
color-scheme: light;
@@ -15,15 +15,12 @@
1515
color-scheme: dark;
1616
}
1717

18-
[data-bezier-theme='dark']:lang(ja),
19-
[data-bezier-theme='light']:lang(ja) {
20-
--typography-heading-font-family: var(--typography-font-family-sans-jp);
21-
--typography-text-font-family: var(--typography-font-family-sans-jp);
22-
--typography-display-font-family: var(--typography-font-family-sans-jp);
18+
:lang(ja) {
19+
font-family: var(--typography-font-family-sans-jp);
2320
}
2421

2522
code {
26-
font-family: var(--typography-code-font-family);
23+
font-family: var(--typography-font-family-monospace);
2724
}
2825

2926
::placeholder {

0 commit comments

Comments
 (0)