question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

  1. fresh install React and Antd,
  2. take old Antd 3.8.0 code with ~50 of <Icon type='' />,
  3. 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:closed
  • Created 5 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
lisandropatcommented, Nov 11, 2018

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.

5reactions
SophosCloudOptixDevelopercommented, Nov 8, 2018

Downgrade your ANTD using:

npm install antd@3.8.1

And then restart the server using “npm start”

Should work 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found