ant-design-icons icon indicating copy to clipboard operation
ant-design-icons copied to clipboard

Style conflict with Tailwind Preflight (or other normalize css)

Open luosheng opened this issue 3 years ago • 1 comments

Ant design icons set a global vertical-align property under the class selector .anticon with a value of -0.125em which could be easily preceded by other element selectors, like the one introduced in Tailwind Preflight.

In that case, the icon is not vertically middle aligned. (Check the image below.) 截屏2021-06-21 下午6 27 07

luosheng avatar Jun 21 '21 10:06 luosheng

You can try override styling for svg tag in your global file css:

svg {
   vertical-align: baseline;
}

phatify avatar Feb 03 '23 15:02 phatify