Icons are doubled by .anticon-icon:before after migrating 3.8.0-3.9.2
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
Version
3.9.2
Environment
Ubuntu 18.04 or Windows 10, React@latest, Chrome@latest, Mozilla@latest
Reproduction link
https://ant.design/components/icon/
Steps to reproduce
- fresh install React and Antd,
- take old Antd 3.8.0 code with ~50 of <Icon type='' />,
- see the screenshot below.
What is expected?
Expected to see blank instead of icons and planned just to add type=‘outlined’ everywhere.
What is actually happening?
CSS property selector ‘:before’ with content: ‘unicode’ was added to all those icons. It causes doubling of all icons.
Example:
.anticon-safety:before {
content: "\E6EA";
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (2 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m using antd 3.9.3 and only importing css one time. Is there any other solution? Momentaneously, I solved it using
.anticon{ svg { display: none; } }
in SCSS.Downgrade your ANTD using:
npm install antd@3.8.1
And then restart the server using “npm start”
Should work 😃