You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!--
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)
- [x] 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
<!-- Please link to issue if one exists -->
<!-- Fixes #0000 -->
## Summary
<!-- Please brief explanation of the changes made -->
bezier-tokens에서 scss 파일을 내보냅니다.
## Details
<!-- Please elaborate description of the changes -->
- 일부 유틸 클래스를 만드는 CSS 모듈에서 토큰에 대한 종류를 모두 알고있어야하는 불편함이 있었습니다. 이번에 #2566 PR
작업을 진행하면서 동일한 작업이 반복되는걸 느껴 이를 함께 수정합니다.
- bezier-tokens에서
[map-deep](https://styledictionary.com/reference/hooks/formats/predefined/#scssmap-deep)
포맷으로 scss output을 만들도록 합니다. 자바스크립트 케이스처럼 `index.scss` 를 만드는 과정을 추가했습니다.
- bezier-token의 `sideEffects` 필드에 scss 파일을 추가합니다.
- scss의 `pkg:` Importer 규칙에 따라 bezier-tokens의 conditional export field를
수정했습니다. bezier-react에선 storybook & build 과정 모두 상대 경로로 지정하는 게 잘 동작해서 pkg
프로토콜은 이 PR에서 사용하지 않았습니다 (시간이 좀 더 걸릴듯함)
### Breaking change? (Yes/No)
<!-- If Yes, please describe the impact and migration path for users -->
No
- ev-inner, ev-base 에 대한 유틸 클래스가 추가로 생기지만 사용처 영향은 없습니다 (매우 미미한 스타일 시트 파일
크기 상승)
## References
<!-- Please list any other resources or points the reviewer should be
aware of -->
-
https://sass-lang.com/documentation/js-api/classes/nodepackageimporter/
- https://webpack.kr/guides/tree-shaking/
Copy file name to clipboardExpand all lines: packages/bezier-tokens/README.md
+35-10Lines changed: 35 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,29 +10,54 @@ npm i -D @channel.io/bezier-tokens
10
10
11
11
## Usage
12
12
13
-
### JavaScript
13
+
### CSS
14
14
15
-
You can access and use values by token group.
15
+
Provide all design tokens as CSS variables. If you want to apply dark theme tokens, add the `data-bezier-theme="dark"` attribute to the parent element. The default is light theme tokens, which can also be applied by adding the `data-bezier-theme="light"` attribute to the parent element.
Provide all design tokens as CSS variables. If you want to apply dark theme tokens, add the `data-bezier-theme="dark"` attribute to the parent element. The default is light theme tokens, which can also be applied by adding the `data-bezier-theme="light"` attribute to the parent element.
36
+
### SCSS
27
37
28
-
```ts
29
-
import'@channel.io/bezier-tokens/css/styles.css'
38
+
While CSS variables are recommended, you can also use SCSS variables directly if you need to.
0 commit comments