Open
Conversation
|
Size Change: +1.64 kB (+0.43%) Total Size: 385 kB
ℹ️ View Unchanged
|
|
Visit the preview URL for this PR (updated for commit 38d7215): https://pixiv-charcoal-web--pr840-mimo-icon-height-fix-61pb7hsb.web.app (expires Thu, 26 Feb 2026 08:29:18 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 314b26d3adca98a761c7e4d9922ebb206ff024a0 |
aa7bdca to
c3e7a12
Compare
c3e7a12 to
87be3bc
Compare
3 tasks
cbf6297 to
2611081
Compare
2611081 to
09a34ad
Compare
f80d094 to
5ee1c94
Compare
5ee1c94 to
38d7215
Compare
| class={className} | ||
| unsafe-non-guideline-fixed-size={actualSize} | ||
| class={`charcoal-icon-component ${className || ''}`.trim()} | ||
| style={{ '--size': `${actualSize}px` }} |
Contributor
There was a problem hiding this comment.
ここだけ、--charcoal-icon-ssr-size とか --charcoal-* みたいな prefix をつける方針じゃなくても大丈夫なのかな?というのが気になりますが、それ以外は #847 (comment) の意図通りになっていてよさそうです!! 😄
(Icon/index.tsx が <pixiv-icon> が内部的に --size を使うことを知っていて良さそうなのかが気になる)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
やったこと
<pixiv-icon>で、大きさをpx単位で指定できるunsafe-non-guideline-fixed-sizeプロパティを追加しました@charcoal-ui/reactの Iconコンポーネントで、大きさをpx単位で指定できるunsafeNonGuidelineFixedSizeプロパティを追加しました@charcoal-ui/reactの Iconコンポーネントで、--sizeの計算を行い、CSS変数をセットするようにしました<pixiv-icon>へはunsafe-non-guideline-fixed-sizeを使って値を渡し、<pixiv-icon>内部で同じ数値計算が行われないよう、処理を変更しています@charcoal-ui/reactの Iconコンポーネントで、<pixiv-icon>に対してCSSを設定し、Iconコンポーネントで計算した高さになるようにしました動作確認環境
Storybook
チェックリスト
不要なチェック項目は消して構いません