Building a new widget with font awsome

1
Hi All, I am creating a new widget that is importing font awsome css from the widget css as follows: @import './mywidgetname/widget/ui/font-awesome.css';   This works for most scenarios, however we found in a project using deeplinks and setting the browser url with the SetURL Context widget the user may be on a page with an unusual path ie:  http://myhost/link/pathto/object?guid=10008  In this case the fontawsome css is not loaded. Any ideas how I can import the font awsome css without altering the css in a major way?    
asked
2 answers
0

Could you not import the CSS from the theme (so put the font-awesome.css in your theme directory)? Because then the path would be the same.

Regards,

Ronald

answered
1

How about this?

@import '/widgets/mywidgetname/widget/ui/font-awesome.css';

That should get it from the root, ignoring any seturl parts.

answered