Commit e847df5
feat(flavor): embed Inhouse Icons woff2 into published CSS
Consumers were missing the icon glyph inside components that render an
<Icon/> internally (e.g. Callout). The SCSS pipeline strips the upstream
@font-face block because Storybook supplies its own override via
.storybook/icon-font-override.scss, but that override does not travel with
the published package.
Resolve by inlining node_modules/@pepabo-inhouse/icon/dist/inhouse-icons.woff2
as a base64 data URL and prepending a single @font-face rule to each
dist/css/{flavor}.css and once to dist/css/all.css. woff2-only (>=97%
browser support as of 2026); woff and eot are intentionally skipped to
minimize size.
The .storybook/flavors/*.css outputs keep the old behavior (no @font-face)
because Storybook continues to rely on its local override and would
otherwise emit duplicate declarations.
Per-file size delta: ~+12 KB (base64-encoded 8.9 KB woff2).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 8995d32 commit e847df5
1 file changed
Lines changed: 26 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
12 | 19 | | |
13 | 20 | | |
14 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
15 | 32 | | |
16 | 33 | | |
17 | 34 | | |
| |||
106 | 123 | | |
107 | 124 | | |
108 | 125 | | |
| 126 | + | |
109 | 127 | | |
110 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
111 | 131 | | |
112 | 132 | | |
113 | 133 | | |
| |||
123 | 143 | | |
124 | 144 | | |
125 | 145 | | |
126 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
127 | 151 | | |
128 | 152 | | |
129 | 153 | | |
0 commit comments