# Icon changelog
Read the complete [LICENSE](https://snowui.dev/LICENSE) for the installed version before use.
Reviewed against Chinese source SHA-256 `fa24e0d056c99be7f8ef5b42101c53ae7016c1ed67e518ae3e6c1d7405a93051`. For version differences, check the installed package as well.
### v2.3.4 (2026-10-23)
- Use a distinct internal name for external children so the Frame children snippet cannot shadow it. Fixes recursive SSR rendering of direct child graphics in the precompiled runtime package; public Props, graphic proportions, sizes and roles are unchanged.
- 2026-09-21: Unified the usage guide, source property table, and Site / AI reading entry points. Documentation only; component behavior is unchanged.
- **Icon-Docs.2026-05-25** Archived the historical changelog at the top of the source file. Subsequent changes go in this document’s changelog; the source header retains only responsibilities, current key architecture, and the documentation path.
### v2.3.3 (2026-08-15)
#### Fixes
- **IC-Base.1** Built-in images and SVGs explicitly own block display, 100% dimensions, and a max-width baseline instead of depending on media resets in optional `snowui-base.css`.
### v2.3.2 (2026-03-31)
#### New features
- **IC-Resource.1** Added pass-through support for icon resource components. `` can directly render a `resource-svelte` icon instead of falling back to the default placeholder.
### v2.3.1 (2026-03-10)
#### New features
- **IC-Role.3** Added Icon composition with an `Image` host: `as="icon"` overlays at the center through `pin-center`, while `as="badge"` shows corner badges through `pin-top-right` / `pin-bottom-right`.
- **IC-Role.4** Added Icon composition with an `ImageViewer` host: `as="prev"` / `as="next"` / `as="close"` can directly use the preview-control positioning protocol.
### v2.3.0 (2026-03-02)
#### Architecture refactor
- **IC-Badge.1** Removed the transparent punch-through effect made with `mask-image`. `` can now stack directly as an ordinary child beside the main icon.
- **IC-Badge.2** Simplified the DOM and removed unused tracking calculations for cutout-space geometry.
#### New features
- **IC-Feat.3** Added a dashed placeholder frame for empty state. It appears automatically when there is no `src` and no children.
### v2.2.8 (2026-02-18)
#### Fixes
- **IC-Fix.9** Corrected background-size semantics: `size` always denotes the inner icon size. With `background`, padding adds to the outer dimensions, such as `80 + padding*2` for `size=80`.
- **IC-HTML.1** Root style variables are now injected only when needed. The default size chain moved into CSS, so default state no longer emits inline size variables.
- **IC-Role.1** Added size-class rules for the Badge role so Button icon-size rules do not override `as="badge"`.
### v2.2.6 (2026-02-18)
#### Architecture changes
- **IC-Arch.1** Switched to single-layer size control: size variables and `width/height/min-size` moved to `.snowui-icon` (the Frame layer); the wrapper now handles positioning only.
- **IC-Arch.2** Removed the `wrapperSizeClass` size-class pass-through patch, restoring external class overrides of `.snowui-icon` according to style precedence.
### v2.2.5 (2026-02-18)
#### Fixes
- **IC-Fix.8** Fixed external size classes not taking effect by also applying `size-*` / `w-*` / `h-*` / `min/max-*` utilities to the wrapper, so `` can override the outer dimensions.
### v2.2.4 (2026-02-18)
#### Architecture changes
- **IC-Bridge.1** Size and typography now use `--snowui-icon-*-override` chains for `width`/`height`/`min-width`/`min-height`/`font-size`/`line-height`.
- **IC-Bridge.2** Background mode now uses `--snowui-icon-*-override` chains for `padding`/`border-radius`/`background-color`.
- **IC-Bridge.3** Inline `style` retains only variable injection and positioning, no longer emitting dynamic final visual values directly.
### v2.2.3 (2026-02-18)
#### Adjustments
- **IC-Token.1** With `background=false`, defaults changed to `padding: var(--padding-0)` and `radius: var(--radius-0)`.
- **IC-Token.2** The feathered edge of the dot-badge mask changed from hard-coded `0.03125rem` to `var(--border-1)`.
### v2.2.2 (2026-02-18)
#### Adjustments
- **IC-Map.1** Background-mode padding moved entirely to `--padding-1/2/3`, mapping `16-32=>4px`, `40-48=>8px`, and `80=>12px` respectively.
- **IC-Map.2** Background-mode radius mapping became `16-20=>--radius-2`, `24-32=>--radius-3`, `40=>--radius-4`, `48=>--radius-5`, and `80=>--radius-7`.
### v2.2.0 (2026-02-07)
#### New features
- **IC-Feat.2** Corner radius now uses CSS variable `--size-radius`, allowing external classes such as `.rounded-full` to override it.
### v2.2.1 (2026-02-13)
#### Fixes
- **IC-Fix.7** Corrected the `sizeMap` scaling error by using `--size-4/5/6/7/8/10/12/20` directly, with compensating calculations for nonstandard sizes. This prevents oversized badges and misplaced positioning under `as="badge"`.
### v2.1.5 (2026-02-03)
#### Documentation
- **IC-Doc.1** Added weight descriptions to match the implementation.
### v2.1.6 (2026-02-05)
#### Architecture refactor
- **Size Context**: Added reading of `size` from Frame context. It affects not only the icon’s font size (`sizeRem`) but also background-mode corner-radius and padding mappings automatically.
### v2.1.4 (2026-02-03)
#### Fixes
- **IC-Fix.4** Background color is now controlled through classes so inline styles cannot override external colors.
- **IC-Fix.5** Font size now uses rem, avoiding scale drift when root font size changes.
- **IC-Fix.6** Skips mask generation when `btoa` is unavailable in SSR, preventing a render error.
### v2.1.3 (2026-02-03)
#### Fixes
- **IC-Fix.3** Dot-badge cutouts now use a radial mask, matching Avatar.
### v2.1.2 (2026-02-03)
#### Fixes
- **IC-Fix.2** The container font size now updates when a child icon explicitly overrides `size`.
### v2.1.1 (2026-02-03)
#### Fixes
- **IC-Fix.1** Badge cutouts also apply to Badge children.
### v2.1.0 (2026-02-03)
#### New features
- **IC-Feat.1** Child icons can explicitly override container `size`/`weight` (not recommended).
#### Breaking changes
- **IC-Break.1** Removed the `name` Prop; `
` uses an empty `alt`.
[Component guide](https://snowui.dev/llms/en/components/icon.md) · [Full reference](https://snowui.dev/llms/en/components/icon/reference.md)