question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

w2ui 1.3.2 doesn't work with FontAwesome 4.0

See original GitHub issue

There are two problems:

  1. FontAwesome 4.0 uses the <i> element so <span> no longer works.
  2. For some reason the font-family from w2ui-reset takes precedence over the CSS from FA.

Workarounds:

I commented out the line in w2ui-1.3.2.css:

.w2ui-reset * {
  color: default;
  /*font-family: Verdana, Arial;*/

And I replaced the two <span> elements next to w2ui-tb-image in w2ui-1.3.2.js.

Afterwards, this works in a toolbar:

{ type: 'menu', id: 'addMenu', icon: 'fa fa-plus', caption: 'Add ...', items: [ ...

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mpf82commented, Dec 19, 2016

add the fa class, too:

https://jsfiddle.net/0hcctstc/1/

0reactions
guillaumeguerincommented, Dec 18, 2016

Problem still exists in w2ui 1.5. I also put the w2ui CSS before the font awesome CSS, still doesn’t work.

I made a simple jsfiddle : https://jsfiddle.net/Shal/0hcctstc/

Read more comments on GitHub >

github_iconTop Results From Across the Web

w2sidebar.icon | JavaScript UI - w2ui
For any node if its icon property is not defined, then default icon will be used. ... The icon property uses a span...
Read more >
w2ui toolbar icon and font awesome 5 not rendering
This was the workaround that allowed the font awesome icons to render properly, adding the oh-so-famous !important .w2ui-tb-image .fa, ...
Read more >
Web Libraries in Jars - WebJars
Start Bootstrap - Freelancer, org.webjars, startbootstrap-freelancer, 1.0.3 ... components-font-awesome, org.webjars.bower, components-font-awesome ...
Read more >
Troubleshooting | Font Awesome Docs
Is your web site loading multiple, conflicting versions of Font Awesome? - This is a common problem when using a CMS like WordPress...
Read more >
All Deployed WebJars WebJars come in three flavors:
1.3.2. "org.webjars" % "angular-aside" % "1.3.2" ... (http://github.com/webjars/fontawesome-markers) ... Start Bootstrap - Freelancer ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found