Skip to content
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

Regression in color behavior #207

Open
ErikBjare opened this issue Apr 26, 2022 · 1 comment
Open

Regression in color behavior #207

ErikBjare opened this issue Apr 26, 2022 · 1 comment

Comments

@ErikBjare
Copy link

I just updated from v3.5 to v4.5 and found that behavior around how colors are set have changed.

The README mentions that:

The icon color is inherited from the font color of the parent element by default. You can easily change it to any other color by specifying the color property.

However, as of v4.5, this is no longer true, and neither setting the color component prop nor the color CSS property. Instead, you need to set the fill CSS property: #141 (comment)

I can't find a way to inherit the color correctly (as it should), so I'm going to have to downgrade for now.

@orzice
Copy link

orzice commented May 10, 2022

我也遇到了这个问题,当我在看demo的时候 发现缺失了 fa-icon 的css样式。
在你的vue或者css文件里面加上

// 可以继承父级的color属性
.fa-icon {
display: inline-block;
fill: currentColor;
overflow: visible;
}

然后就可以正常使用了。
希望可以帮助到你。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants