Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow for size constraints using conventional units #4

Open
binaryartifex opened this issue May 24, 2024 · 1 comment
Open

allow for size constraints using conventional units #4

binaryartifex opened this issue May 24, 2024 · 1 comment

Comments

@binaryartifex
Copy link

Is it possible, or is there a wrapper im not aware of that allows for the constraining of these icons to something like em's? ie. if the base viewbox is 0 0 24 24 (it looks like it is universally across the icon set) then by setting the width and height to 1em, i can either constrain or inherit from font sizing in my css rules instead of having to rely on passing size props in my components ...the svgr online playground here is a perfect example of what im talking about.

@boar-is
Copy link

boar-is commented Aug 9, 2024

.parent {
  font-size: 24px; // this changes icon's size
}

svg {
  width: 1em;
  height: 1em;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants