bantikyan / icheck-bootstrap

Pure css checkboxes and radio buttons for Twitter Bootstrap.
https://bantikyan.github.io/icheck-bootstrap/
MIT License
140 stars 35 forks source link

bootstrap 4 beta2 #5

Closed joshua1 closed 6 years ago

joshua1 commented 6 years ago

Hi @bantikyan I had this working with the alpha 6 version of bootstrap 4. we recently updated to beta2 and the checked state for both checkbox and radio button now looks messed up. what style changes do i need to get it working with boostrap 4 beta 2 ( also changed the bootstrap version in the code pen and you get what am talking about)

bantikyan commented 6 years ago

Hello @joshua1 , bootstrap 4 stops support of glyphicon fonts. For workaround of this problem I think you can do this

  1. make sure you have glyphicon fonts in your fonts folder (https://github.com/twbs/bootstrap-sass/tree/master/assets/fonts/bootstrap)
  2. place this css somewhere in your css files before icheck-bootstrap
@font-face {
    font-family: 'Glyphicons Halflings';
    src: url('../fonts/glyphicons-halflings-regular.eot');
    src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),url('../fonts/glyphicons-halflings-regular.woff') format('woff'),url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
}
joshua1 commented 6 years ago

Thanks @bantikyan . Will this work with font awesome if the content and font-family is changed to reference something like \f14a

bantikyan commented 6 years ago

Yes font-awesome is also an option.

joshua1 commented 6 years ago

I will try it now and do a PR for font-awesome option if it works Ok

bantikyan commented 6 years ago

Yes but it will require font-awesome as a dependency. Now we only depend on bootstrap, and not everybody use font-awesome. So we have to consider that.