-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
[Feature Request] Convert rem|em values to pixel values #376
Comments
I just hit a bug where rem values aren't working for Why was this closed without comment? |
I have similar needs |
Reopening for evaluation... |
We've released v4.1.0 which includes a We will continue to monitor future feature requests for a helper that covers |
I have a use case for a function that transform relative (em, rem) units into pixel values. Basically the opposite of what the
em
andrem
functions do.The reason behind this is that I use rem units throughout my styles for consistent UI component design, and I came across an issue where SVG elements sized with rem units don't work across all browsers.
As an example, Chrome renders ok with rem units:
But Firefox doesn't :
They do however seem to work with em units, but since that's dependent on whatever context the component is used in, it does not seem solid for my use case.
The API could look something like this:
If it seems like a good idea, I could give a try to implementing it. Suggestions for naming and API are welcome !
The text was updated successfully, but these errors were encountered: