-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Latest update to @blueprintjs/icons breaks static icon rendering when icons CSS not imported #6637
Comments
Thanks for pointing this out, I see that this might be a regression if you were not previously importing We could fix the problem by moving these styles to @blueprintjs/core, but that breaches the abstraction layer of the @blueprintjs/icons module. Are there any downsides to importing |
I think this issue probably raises some good questions with respect to Blueprint usage given the new static icon import paradigm. We stopped importing As for breaching the abstraction layer of the icons module, it seems to me that .bp5-icon-add::before{
content:"\f109";
}
... I do wonder why this exists in the core CSS file instead of the icons CSS? It adds quite a bit of extra heft to our CSS file that is never used. |
That's a good point... we should move that CSS to To be extra safe, I think the change to move the icon font CSS to In the meantime, I can fix your reported regression by moving the |
Yep sounds like a good change and makes sense to do it in a new major version. |
I ended up with a different solution which reverts to applying |
When using only static icon imports from Blueprint there is no need to import
blueprint-icons.css
, however with the latest change the icons are broken if the CSS is not imported.Environment
Code Sandbox
Steps to reproduce
blueprint-icons.css
<Download size={16} />
Actual behavior
Icon is not rendered correctly due to missing
transform-origin: center;
styles.Expected behavior
Expected the icons to render correctly without needing to import
blueprint-icons.css
Possible solution
Move the new styles to
blueprint.css
The text was updated successfully, but these errors were encountered: