Based on this issue announcing support for the Breakpoints module (https://www.drupal.org/node/2319215), I thought custom breakpoints for my Bootstrap subtheme (CDN based) would be as simple as installing the Breakpoints module and adding the custom breakpoints to my .info file as directed. However, even though I've confirmed that Breakpoints module has read my custom breakpoints correctly, this doesn't seem to have any effect on Bootstrap's breakpoints.

Presumably when you say Breakpoints module is supported, you mean the subtheme .info file can define custom breakpoints for other modules? I thought it meant that Drupal Bootstrap would use the breakpoints defined in Breakpoints.

If we can't override Drupal Bootstrap's built-in breakpoints using the Breakpoints module, and there doesn't seem to be any way to get a different compile of the Bootstrap CSS and JS from the CDN, what is the expected way to change the breakpoints that the Drupal theme uses?

I've looked through the documentation and searched for references to breakpoints in the code, and not found anything. In non-Drupal bootstrap obviously it's easy, you just compile a different version.

To be clear, I want to simply change the min/max width pixel values for xs, sm, md, and lg, not define any completely new breakpoints.

Comments

alanom created an issue. See original summary.

alanom’s picture

Title: How to change the breakpoints? » How to change the breakpoints used by Drupal Bootstrap theme?
alanom’s picture

I've managed to get something seemingly working using a custom download of the Bootstrap front end files with CDN disabled and using the Bootstrap Libraries module to host the files.

I'm not sure if this risks causing problems later on though, if there's a potential mismatch between the breakpoints in the front end JS and CSS and in the back end module code or configuration.

markhalliwell’s picture

Title: How to change the breakpoints used by Drupal Bootstrap theme? » Allow sub-theme to alter breakpoints of base theme
Project: Bootstrap » Breakpoints
Version: 7.x-3.5 » 7.x-1.x-dev
Component: Starterkit (CDN) » Code
Category: Support request » Feature request

This is a, current, limitation of the Breakpoint module.

There is no drupal_alter calls inside Breakpoints, which would be the easiest way for a sub-theme to alter existing breakpoints.

phai’s picture

(sorry, wrong comment, I delete it)