danawoodman / react-fontawesome

A React Font Awesome component.
https://www.npmjs.com/package/react-fontawesome
MIT License
667 stars 72 forks source link

Use by css pseudo way #24

Closed codermango closed 8 years ago

codermango commented 8 years ago

Hello,

I just wanted to use the library like the normal css pseudo way. For example: .demo:after { content: ' \f2b4 '; font-family: "FontAwesome"; }

The problem is do I have to add css link in the head? Is there a way that can be done without doing that? I am implementing react components outside of the whole project and I think it is the best if the components don't depend on files in other place.

Thank you.

danawoodman commented 8 years ago

I'm confused. Why not just use Font Awesome by itself? Seems like there would be no point to use this React library if you're using CSS to inject the icon instead?

codermango commented 8 years ago

Sorry for confused. I mean I don't want to add something like this <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"> in <head></head>, but I want to use this kind of thing .demo:after { content: ' \f2b4 '; font-family: "FontAwesome"; } in my react component implementation.

Is it possible?

danawoodman commented 8 years ago

@codermango I don't really know. I guess you could inject the character code in but you'd still need the font for it to work. Think this is beyond the scope of this project so I'm going to close the issue