sage icon indicating copy to clipboard operation
sage copied to clipboard

Grid Customization

Open leoj3n opened this issue 14 years ago • 3 comments

The Twitter bootstrap grid can be customized easily via LESS: http://twitter.github.com/bootstrap/scaffolding.html#gridCustomization.

I think it would be cool if it was possible to customize roots' grid through the child theme. Essentially, I think it would be possible to have filters like roots_gridColumns, roots_gridColumnWidth and roots_gridGutterWidth (siteWidth would be computed automatically from the previous 3 variables).

The code in the child theme would be, for example: add_filter( 'roots_gridColumns', 'childtheme_gridColumns' ); where the childtheme_gridColumns function receives the default value (of 12) and returns an integer (just like any other WordPress filter).

leoj3n avatar Feb 19 '12 18:02 leoj3n

how would this be possible without editing the bootstrap core files? wouldn't the .less files need to be .php to get those values?

retlehs avatar Mar 01 '12 00:03 retlehs

generate that bit of css with php.

leoj3n avatar Mar 02 '12 07:03 leoj3n

@leoj3n - Just found a plugin that seems to do exactly this. http://wordpress.org/extend/plugins/bootstrap/

ChrisClayton avatar Mar 04 '12 01:03 ChrisClayton