The recent change with the implementation of allowing a bootstrap CDN is all fine and good, but I do not think it is wise to put the "else" statement of using the manually downloaded bootstrap library in the theme folder to be hard-coded in theme.inc.
The .info file is where where people assume that css and js files are added by default, and rightfully so. More advanced users may want to change how these files are included (placing the library outside of theme folder, using LESS files instead, etc.) and hard-coding the "default" method of including these files within theme.inc I think is not the best practice, as you have to search for how the files are even being included in the first place. Can we instead have the CDN "else" statement in theme.inc simply refer back to the locations set in the .info?
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | css_exclude-2.patch | 2.75 KB | andregriffin |
| #3 | css_exclude.patch | 2.59 KB | frankbaele |
Comments
Comment #1
frankbaele commentedyou make a valid point, maybe bootstrap should just unset the all the bootstrap css if its activated. or shouldnt do anything just at the css
Comment #2
andregriffin commentedYes, I think if you could try and unset the .info's css/js and then add via CDN if activated, that would make sense. This will also fix the sort/weight problem from the other issue, as the order of inclusion in the .info is honored in the markup.
Comment #3
frankbaele commentedComment #4
frankbaele commentedComment #5
frankbaele commentedbtw could you take a look at http://drupal.org/node/1857358
Comment #6
andregriffin commentedLooks great. Here's a slight modification that ensures the CDN css is added in the right order/group (theme layer, after modules, before style.css)
Comment #7
frankbaele commentedcommit this to dev ?
Comment #8
andregriffin commentedSeems okay to me. Thanks
Comment #9
frankbaele commentedFixed in dev - http://drupalcode.org/project/bootstrap.git/commit/033899d
Comment #10.0
(not verified) commentedclarification