Changing Width of Font Awesome Icons
Really easy using scale .fa { transform: scale(1.5,1); }
Really easy using scale .fa { transform: scale(1.5,1); }
TL;DR Use CSS filter: drop-shadow(…). DOCUMENTATION The reason text-shadow property does not work is that Font Awesome is not text when you use svg version loaded by javascript. I tried loading it using css and it works. Font Awesome loaded with CSS: .fa-globe{text-shadow:3px 6px rgba(255,165,0,.75)} <link rel=”stylesheet” href=”https://use.fontawesome.com/releases/v5.7.0/css/all.css”> <i class=”fas fa-10x fa-globe”></i> This will not … Read more
Apply the styles directly on the icon. .fa-gradient { background: -webkit-gradient(linear, left top, left bottom, from(#f00), to(#333)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } <link href=”https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css” rel=”stylesheet”/> <i class=”fa fa-3x fa-wrench fa-gradient”></i>
Ok, I got help with that and there were several issues with the paths that were the main problem. I’ll explain them here in case it helps someone in my position. The problem was: indeed, the font files were not loading The errors: mostly related to paths and how compass & sass behave with @import … Read more
This worked for me: Add the following lines to your web.config <system.webServer> <staticContent> <remove fileExtension=”.woff”/> <mimeMap fileExtension=”.woff” mimeType=”application/x-font-woff” /> </staticContent> </system.webServer> You have to add these lines because by default Apache is not configured with .woff as a default MIME-type. Apache default MIME-type This holds for IIS as well. As Seb Duggan explains here:IIS default … Read more
Got it! Create a canvas Draw the fa icon on it Change it into a base-64 image url Apply the image on the cursor css style And I made a demo: http://jsfiddle.net/rqq8B/2/ // http://stackoverflow.com/questions/13761472/how-to-render-glyphs-from-fontawesome-on-a-canvas-element // http://stackoverflow.com/questions/13932291/css-cursor-using-data-uri $(function() { var canvas = document.createElement(“canvas”); canvas.width = 24; canvas.height = 24; //document.body.appendChild(canvas); var ctx = canvas.getContext(“2d”); ctx.fillStyle = … Read more
I had the same problem. Read their Readme.md, and you see that there is this note: Note: This component does not include any of the Font Awesome CSS or fonts, so you’ll need to make sure to include those on your end somehow, either by adding them to your build process or linking to CDN … Read more
import { FontAwesomeIcon } from “@fortawesome/react-fontawesome” import { faFacebook } from “@fortawesome/free-brands-svg-icons” const icon = <FontAwesomeIcon icon={faFacebook} /> I found the spelling/casing of the brand icons on FontAwesome’s GitHub
You could toggle which one’s shown on hover: HTML: <a href=”#” class=”lock”> <i class=”icon-unlock”></i> <i class=”icon-lock”></i> </a> CSS: .lock:hover .icon-unlock, .lock .icon-lock { display: none; } .lock:hover .icon-lock { display: inline; } Or, you could change the content of the icon-unlock class: .lock:hover .icon-unlock:before { content: “\f023”; }
Font-Awesome icons, as the name suggests, are font-based. This means to decrease their size all you have to do is decrease their font-size: .fa { font-size: 12px; }