Skip to content

Conversation

stlgaits
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
Docs? no
Issues Fix #3016
License MIT

Set default viewBox size to 0 0 16 16 when not specified in Iconify icon set as per their documentation specifies : https://iconify.design/docs/types/iconify-json.html#icon to avoid exception being thrown when rendering via ux_icon() or <twig:ux:icon />

@carsonbot carsonbot added Bug Bug Fix Icons Status: Needs Review Needs to be reviewed labels Aug 22, 2025
@smnandre
Copy link
Member

I do agree with your messages (here and in the og issue), less so for the "bug" term but nervermind 😄

Thank you for taking the time to open a PR !

@carsonbot carsonbot added Status: Reviewed Has been reviewed by a maintainer and removed Status: Needs Review Needs to be reviewed labels Aug 23, 2025
@Kocal Kocal force-pushed the fix-icon-viewbox branch from 970a992 to 8847799 Compare August 23, 2025 06:34
@Kocal Kocal changed the title [Icons] fix set default viewBox when not defined in Iconify icon set [Icons] Fallback to default dimensions 16/16 when Icon's dimensions on Iconify are missing Aug 23, 2025
@Kocal Kocal force-pushed the fix-icon-viewbox branch 2 times, most recently from 62bfec7 to 00d82ed Compare August 23, 2025 06:36
@Kocal Kocal force-pushed the fix-icon-viewbox branch from 00d82ed to 5945959 Compare August 23, 2025 06:39
@Kocal
Copy link
Member

Kocal commented Aug 23, 2025

I just did some modifications for adding private const and to ensure a default value is set even if only one of the width or height is null

@Kocal
Copy link
Member

Kocal commented Aug 23, 2025

Thanks @stlgaits.

@Kocal Kocal merged commit 30c3a2e into symfony:2.x Aug 23, 2025
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug Fix Icons Status: Reviewed Has been reviewed by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Icons] some pajamas and oui icons throw no height & no width error even when explicitly specified
4 participants