Quantcast
Channel: responsive – WordPress.org Forums
Viewing all articles
Browse latest Browse all 16569

jmjf on "[Theme: The Bootstrap] Can't toggle sub-menu items on collapsed nav"

$
0
0

A couple of other notes re: FontAwesome.

If you aren't comfortable compiling LESS (if you're looking at js, you probably are), you have a couple of options. You can simply inject the stylesheet for FA after bootstrap.min.css. See http://fortawesome.github.io/Font-Awesome/#integration for an example of this and wp_enqueue_style in WP Codex.

Alternatively, you can go to bootswatchr.com and create a custom version of Bootstrap without sprites.less--just discovered this today. (bootswatchr.com, Start Creating in the hero unit, wait for the js to load and initialize, Settings tab, set Exclude Icons to show Exclude, get the css, replace in the-bootstrap/css, then inject FA's stylesheet as above) This option reduces the size of your bootstrap css by not loading the default icon styles that you won't need with FA.

Note that bootswatchr only generates the CSS (or variables.less), so it uses Twitter Bootstrap 2.3.0 (unless you select a different version in Settings). BS 2.3.1 is a set of js-only fixes, so doesn't affect bootswatchr. Also bootswatchr generates bootstrap and bootstrap-responsive in a single css file. You can empty bootstrap-responsive.min.css or you can wp_dequeue_style( 'twitter-bootstrap-responsive' ); so it isn't included on the page at all. (You'll want to wrap the dequeue in a function and add_action( 'init', 'function_name' ); after the function.)

If you'll set up a (test) site with un-minified bootstrap.js (just rename unminified to .min. so it will load) and give me a link to it, I'll try to look at it in the Firebug console. Minified js is a mother to debug. :)


Viewing all articles
Browse latest Browse all 16569

Trending Articles