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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Action Buttons displaying tiny icons #1042
Comments
Just dropping a comment here to follow this thread. Stumbled upon the same situation just now! :) |
@deloreyj I cloned your report into a code sandbox and the issue doesn't seem to occur. https://codesandbox.io/s/eloquent-wildflower-9jsn7 I did have to change @evargast do you have an example? |
Sure thing! You can reproduce it on storybook ( Live Storybook for it: https://evargast.github.io/tiny-icons/ |
Ah, so setting |
The specific answer is we don't own the html template that our react spectrum app gets rendered inside. More generally, it's fairly common practice for sites built pre flex/grid to set box-sizing to border-box globally to make layout more intuitive. If I thought this bug would be isolated to a weird decision made in the Magento codebase (of which there are many), I'd have just patched it and moved on. But I suspect a lot of sites with legacy baggage may run into this issue. |
馃憤 makes sense. We can patch this in the button css here: react-spectrum/packages/@adobe/spectrum-css-temp/components/button/index.css Lines 100 to 107 in 49ce140
Feel free to submit a PR to help move this along! 馃檱 |
Will do, thanks for the direction! |
馃悰 Bug Report
When used on a site that sets box-sizing with the univeral box sizing with inheritance approach, the icons inside of action buttons appear tiny.
馃 Expected Behavior
Icons should appear normal size regardless of global box sizing rules
馃槸 Current Behavior
Icon appears tiny inside action button
馃拋 Possible Solution
It appears to be happening because the inside the action button does not define a
box-sizing
rule, which typically works because it expects the defaultcontent-box
. One solution would be to add a style rule like the following to prevent the svg from inheriting馃敠 Context
Magento runs react-spectrum UI inside the Magento shell and the shell CSS causes this bug in all our apps
馃捇 Code Sample
https://github.com/deloreyj/spectrum-action-button/tree/master
馃Б Your Company/Team
Adobe Magento
The text was updated successfully, but these errors were encountered: