font-awesome

react-fontawesome not displaying icons

只愿长相守 提交于 2019-12-05 10:18:57
问题 I'm attempting to using react-fontawesome and implementing it in what seems to me to be exactly the same as the readme: https://github.com/danawoodman/react-fontawesome/blob/master/readme.md import React from 'react'; import FontAwesome from 'react-fontawesome' ... export default class ComponentName extends React.Component { render() { return ( <div> <div> <span> <FontAwesome className='super-crazy-colors' name='rocket' size='2x' spin style={{ textShadow: '0 1px 0 rgba(0, 0, 0, 0.1)' }} />

Upgrade process for fontawesome from 4 to 5

戏子无情 提交于 2019-12-05 09:41:06
问题 We contributed to font-awesome 5 (yea), and we are looking from moving from our existing icons (Symbol set) to font-awesome. Will the naming of icons and usage of font-awesome 5 be backwards compatible with font-awesome 4.7? IE: Should we go to 4.7 now, and have very easy upgrade to 5.0? OR should we hold off until font-awesome 5 comes out? 回答1: It's not backwards compatible. I just publish a script to do the migration from 4 to 5 in: https://github.com/estebandelaf/scripts/blob/master

How to check if Font Awesome is loaded in web page with javascript?

隐身守侯 提交于 2019-12-05 08:57:06
I need to check if a web page has Font Awesome in it. If not I'm going to load it with javascript. Kinda like how the facebook sdk checks to see if there is a script element containing the id "facebook-jssdk", if so it just returns (does nothing), if not it loads it. I need to do that for Font Awesome. I think this is the best way to check for font-awesome, but I'm not sure if it's slower then just loading it again even if it is there. function css(element, property) { return window.getComputedStyle(element, null).getPropertyValue(property); } window.onload = function () { var span = document

How to use font icon (font-awesome) in XML selector

爱⌒轻易说出口 提交于 2019-12-05 07:58:42
Is it possible to use font icon in selector instead of drawable ? <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android" > <item android:drawable="@drawable/menu_home_press" android:state_pressed="true"></item> <item android:drawable="@drawable/menu_home"></item> </selector> I changed text color in selector instead of drawable. Its working fine. Create MyTextView class which extends TextView public class MyTextView extends TextView { public MyTextView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init

How to use fontawesome in Chrome Extension?

有些话、适合烂在心里 提交于 2019-12-05 07:32:47
I am developing a Google Chrome Extension that is displayed on a specific website. And I want to use Fontawesome in my chrome extension. When I try to load fonts, the error GET chrome-extension://invalid/ net::ERR_FAILED occured. In the stylesheet, webfonts are included with @font-face like this. src: url('chrome-extension://__MSG_@@extension_id__/Fonts/fontawesome-webfont.eot?v=4.7.0'); I also tried to embed my extension id directly, though it doesn't work. My manifest.json: "web_accessible_resources": ["Fonts/*.*", "*.ttf", "*.eot", "*.svg", "*.woff", "*.woff2"], How to solve this? This is

How to insert font awesome icon into text input? [closed]

天涯浪子 提交于 2019-12-05 07:25:16
How can I insert a calendar web font icon into my input field? HTML: <input class="start_date" type="text"> CSS: .start_date:before { font-family: "FontAwesome"; content: "\f073"; } <input> is a self-closing tag, you cannot have any :before or :after pseudo element in it. You could wrap it into a <label> or <span> so and attach it there. .start_date:before { font-family: "FontAwesome"; content: "\f073"; } .start_date:before, .start_date input { vertical-align: middle; } <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> <label class=

Error including font-awesome with webpack

ぃ、小莉子 提交于 2019-12-05 06:33:05
问题 I am trying to include font-awesome with webpack. The below import 'font-awesome/css/font-awesome.css'; or require('font-awesome/css/font-awesome.css') produces the following error ERROR in multi vendor Module not found: Error: Can't resolve 'font-awesome' in '...' @ multi vendor Whats wrong? font-awesome is already installed I am using fountain.io , the full webpack config looks like: const webpack = require('webpack'); const conf = require('./gulp.conf'); const path = require('path'); const

Font Awesome 5 icons not working with React (“Could not find icon” error)

大兔子大兔子 提交于 2019-12-05 06:14:10
I'm trying to use Font Awesome 5 Pro (I have a license) in my React project, and I've followed the instructions in the API to the best of my ability, but I'm still having issues. In my project, I used npm to install fontawesome, fontawesome-common-types, fontawesome-pro-light, fontawesome-pro-regular, fontawesome-pro-solid, and react-fontawesome. All those folders are in my node_modules/@fortawesome/ directory In my App.js, I have these imports (this isn't the whole file, just the relevant snippets): import fontawesome from '@fortawesome/fontawesome'; import FontAwesomeIcon from '@fortawesome

Font-Awesome icon preventing click in parent button

会有一股神秘感。 提交于 2019-12-05 04:41:43
I'm having a problem where the left two pixels of a Font-Awesome icon I've placed inside of a button element do not trigger the click event of the button. Here's an example button: <button class="btn btn-mini"> <i class="icon-edit"></i> </button> And here's what it looks like with bootstrap Any ideas for why those left two pixels don't trigger a click event? Edit : Here's a test site where I've managed to recreate the issue: http://ace.cwserve.com Outline The outline isn't part of the CSS box, which means it won't fire click events. This is perhaps slightly counter-intuitive, but that's how it

Google Maps v3 FontAwesome5

落花浮王杯 提交于 2019-12-05 04:10:30
问题 I am trying to create a googleMap that uses dynamic fontAwesome markers I can't seem to be able to set 'Font Awesome 5 Free' as the font to be used, though. I can set 'Fontawsome' which works, but is not a webfont (It's a .TTF installed in MY system) var marker0 = createMarker({ position: new google.maps.LatLng(33.808678, -117.918921), map: map, icon: { path: google.maps.SymbolPath.CIRCLE, fillColor: '#F00', fillOpacity: 1, strokeWeight: 0, scale: 15 }, label: { fontFamily: "FontAwesome",