Skip to content

[Bug:] SVG icon resizing gets overwritten by font-size style #3667

@zarahzachz

Description

@zarahzachz

Describe the Bug

A teammate's using the Download icon in a way where it's used inside a small sized Button on mobile and a big sized Button on desktop. We found that the icon isn't adjusting to the size of the big button and it appears to be caused by the font-size set inside the icon class (picture below):

Image

This seems to be a bug as it prevents the icons from growing larger than the base font-size. I think this needs to be removed to allow icons to grow/shrink to the size of its parent, regardless of what size that parent specifies.

To reproduce

I've been playing around with the icons on Storybook. Changing the font size of the wrapping container is supposed to adjust the icon size, but you'll see it doesn't.

Expected behavior

The SVG should be fully responsive, shrinking and growing relative to the font-size of its parent container.

Desktop Operating System

Mac

Desktop Browser Name

Chrome

Desktop Browser Version

No response

Device

No response

Mobile Operating System

No response

Mobile Browser Name

No response

Mobile Browser Version

No response

Additional context

No response

Codebase/Repository URL

No response

Design System Version

No response

Existing branch or Pull request on Github

No response

Team Name

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Impacts: CoreImpacts the core DS primarily, changes may occur in other themes as well.Impacts: DocumentationIndicates that this item relates to documentationImpacts: HealthcareImpacts the Healthcare.gov theme directly.Impacts: MedicareImpacts the Medicare theme directly.Status: In JIRAIndicates that this item is also tracked in JiraStatus: Work In ProgressPR's that are not yet ready for reviewdependenciesPull requests that update a dependency filejavascriptPull requests that update javascript code

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions