Git Product home page Git Product logo

Comments (14)

ellenhutchings avatar ellenhutchings commented on June 6, 2024 6

Using less to set the font family to "Font Awesome 5 Free" still leaves it not working.

The font-weight, also needs to be overridden to be 900 (at least for the free version). Based on my checking, as low as 600 will also work, but why complicate things.

This should either be changed in the project, or added as a variable for less/sass users (or both)

from awesome-bootstrap-checkbox.

EgorZotov avatar EgorZotov commented on June 6, 2024 5

This helped me to restore checkbox.

In CSS

.abc-checkbox input[type="checkbox"]:checked+label::after,
.abc-checkbox input[type="radio"]:checked+label::after {
    font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free";
    content: "\f00c";
    font-weight: 900;
}

In HTML

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css">

from awesome-bootstrap-checkbox.

ellenhutchings avatar ellenhutchings commented on June 6, 2024 2

The font-weight needs to be 900

from awesome-bootstrap-checkbox.

KillerSquid avatar KillerSquid commented on June 6, 2024 2

While this works with the CSS version of FA5:

.abc-checkbox input[type="checkbox"]:checked+label::after,
.abc-checkbox input[type="radio"]:checked+label::after {
    font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free";
    content: "\f00c";
    font-weight: 900;
}

it does not work if you're using the FA5 Pro JS/SVG option. Any one got any thoughts on that one?

from awesome-bootstrap-checkbox.

specialpointcentral avatar specialpointcentral commented on June 6, 2024 1

The main resaon for this problem is the font-family not work in Font Awesome 5, change to Font Awesome 5 Free or Font Awesome 5 Pro is OK.
I wander why they want to change the name . WTF

from awesome-bootstrap-checkbox.

NightMan-1 avatar NightMan-1 commented on June 6, 2024

Hi!

Try this:

.abc-checkbox input[type="checkbox"]:checked + label::after,
.abc-checkbox input[type="radio"]:checked + label::after {
  font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free";
  content: "\f00c"; }

ps I use Font Awesome 5 Pro

from awesome-bootstrap-checkbox.

Xen3r0 avatar Xen3r0 commented on June 6, 2024

Hi,

It's work with awesome-boostrap-checkbox 0.3.7 ?

I try:

.checkbox input[type="checkbox"]:checked + label::after,
.checkbox input[type="radio"]:checked + label::after {
  font-family: "Font Awesome 5 Free";
  content: "\f00c";
}

input[type="checkbox"].styled:checked + label:after,
input[type="radio"].styled:checked + label:after {
  font-family: "Font Awesome 5 Free";
  content: "\f00c";
}

But doesn't work :(

from awesome-bootstrap-checkbox.

htrex avatar htrex commented on June 6, 2024

I'm using Font Awesome 5 and importing the fa-check icon with the following code on app.module.ts

import {faCheck} from '@fortawesome/fontawesome-free-solid';
fontawesome.library.add(faCheck);

The icon is shown without problem using a classic HTML tag in the templates of any component, even lazy loaded ones.
<span class="fas fa-check"></span>

... but Font Awesome 5 for Angular uses JS and SVG internally instead of a font, so the suggested workaround doesn't fix the problem with abc-checkbox, in this case.

At the end I've used https://icomoon.io to export just the fa-check icon in a font, imported that and changed the above workaround to use my single icon font.

from awesome-bootstrap-checkbox.

ellenhutchings avatar ellenhutchings commented on June 6, 2024

You can use web fonts with font awesome. The package has the fonts and css in the web-fonts-with-css folder.

from awesome-bootstrap-checkbox.

htrex avatar htrex commented on June 6, 2024

@ellenhutchings is it possible to import only the needed fa-check icon icon from the web-fonts-with-css folder?

from awesome-bootstrap-checkbox.

lucianomilen avatar lucianomilen commented on June 6, 2024

I tried @NightMan-1 's solution but it didn't work. I was on AngularJS btw... Strangely the plugin works perfectly on Angular5 🤔

from awesome-bootstrap-checkbox.

HunterLomo avatar HunterLomo commented on June 6, 2024

But doesn't work ,too :(

from awesome-bootstrap-checkbox.

ellenhutchings avatar ellenhutchings commented on June 6, 2024

WIthout the actual fonts and classes the checkbox stuff won't work. Awesome bootstrap checkbox uses web fonts, and already has the check icon information

from awesome-bootstrap-checkbox.

gimler avatar gimler commented on June 6, 2024

This works for me scss

$font-family-icon: 'Font Awesome 5 Free';
$fa-var-check: "\f00c";
@import '~awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.scss';
.checkbox input[type="checkbox"]:checked+label::after,
.checkbox input[type="radio"]:checked+label::after {
  font-weight: 600;
}

from awesome-bootstrap-checkbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.