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

[Note] Attention when using fontawesome #375

Closed
titieo opened this issue Oct 4, 2020 · 5 comments
Closed

[Note] Attention when using fontawesome #375

titieo opened this issue Oct 4, 2020 · 5 comments
Assignees
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed

Comments

@titieo
Copy link

titieo commented Oct 4, 2020

For those who use fontawesome, please add these lines to your index.styl:

.iconfont
  &.fa, &.fas
    font-weight 900
@titieo titieo added the bug Something isn't working label Oct 4, 2020
@Mister-Hope Mister-Hope added the waiting for response Waiting for users to confirm the solution label Oct 5, 2020
@Mister-Hope Mister-Hope removed the waiting for response Waiting for users to confirm the solution label Oct 6, 2020
@titieo
Copy link
Author

titieo commented Oct 8, 2020

Hi there, after a few days I realise that there is still another bug (I'm still using FontAwesome)
As you see in the picture below, the icon next to Account rendered different from the original.
Other icon next to Cat, Tags, Timeline have the same issue. They look transparency. I've taken a look and finally realise that sth change from the solid style into regular style (change solid into transparency and add border). Because the fas fa-tag, fas fa-th-large, fas fa-history are 100% solid so they become completely transparency. Would you mind have a look at this? Thanks

image

image

@titieo titieo changed the title [Bug] Problem with icon [Bug] Problem with icon rather than iconfont.cn Oct 8, 2020
@Mister-Hope Mister-Hope reopened this Oct 8, 2020
@Mister-Hope
Copy link
Member

Got it, font-weight: 400 is inflecting the apprence:

image
image

@titieo
Copy link
Author

titieo commented Oct 8, 2020

Well, there is a document about font-weight:
https://fontawesome.com/how-to-use/on-the-web/advanced/css-pseudo-elements

@Mister-Hope
Copy link
Member

Mister-Hope commented Oct 8, 2020

Well, there is a document about font-weight:
https://fontawesome.com/how-to-use/on-the-web/advanced/css-pseudo-elements

The problem is that while fontawesome is changing font-weight in different types, iconfont is not setting it's font-weight. But iconfont icons do need a normal(400) font weight to make the icon appearance right. Tags like h1 and other classes in theme have different font-weight, which will affect the icon appearance, that's why I set a default font-weight: 400( the same as font-weight: normal) to the icon in order to ensure the icons have the correct appearance.

I am hoping that the icon class user added have a higher priority. But I forgot users are adding a css link to the final css which will make the classes have a lower priority, which is not what I am expected.

I didnot catch up with a better solution.

Either I remove that style and let all the iconfont users to add that style in their index.styl, or I remain the style and let all the fontawesome users to add the style I list above. It's kind of document thing.

Since more users are using iconfont, I am going to remain the style, and metion users to add extra style when using fontawesome in docs.

If you have any ideas improving the situation, welcome to reply.

@Mister-Hope Mister-Hope added documentation Improvements or additions to documentation help wanted Extra attention is needed labels Oct 8, 2020
@Mister-Hope Mister-Hope changed the title [Bug] Problem with icon rather than iconfont.cn [Note] Attention when using fontawesome Oct 10, 2020
@Mister-Hope Mister-Hope removed the bug Something isn't working label Oct 10, 2020
@vuepress-theme-hope vuepress-theme-hope deleted a comment from titieo Oct 10, 2020
@vuepress-theme-hope vuepress-theme-hope deleted a comment from titieo Oct 10, 2020
@vuepress-theme-hope vuepress-theme-hope deleted a comment from titieo Oct 10, 2020
@vuepress-theme-hope vuepress-theme-hope deleted a comment from titieo Oct 10, 2020
@Mister-Hope Mister-Hope pinned this issue Oct 10, 2020
@Mister-Hope
Copy link
Member

Font awesome is supported in 1.7.0.

See https://vuepress-theme.mrhope.site/guide/feature/icon/

@Mister-Hope Mister-Hope unpinned this issue Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants