backdrop / backdrop-issues

Issue tracker for Backdrop core.
144 stars 39 forks source link

Make Bootstrap the default theme (or at least make it a base theme) #54

Closed luiselizondo closed 10 years ago

luiselizondo commented 11 years ago

I think we can include the Bootstrap theme as a base theme and a sub theme that uses Bootstrap to demonstrate how to do it. Since many people is using Bootstrap, it could also help boost adoption.

If there's any support behind this, I can start porting the Bootstrap theme.

quicksketch commented 11 years ago

Hi @luiselizondo! Thanks for this suggestion. It's true we've got new flexibility in deciding which directions we want to take Backdrop, but my own experiences with combining Bootstrap and Drupal have not been productive.

Because Bootstrap is heavily markup-dependent (defined class names and such), it requires a significant amount of template and theme overriding/preprocessing. Either that or you can rename all the classes used by Bootstrap to match Drupal/Backdrop.

Designers also have been extremely negative about Bootstrap from a base-theme perspective. There's bunch of discussion here: https://drupal.org/node/1801582

But on top of all of it, Bootstrap isn't GPL (or GPL-compatible) licensed, so we couldn't even use it if we wanted to unless https://github.com/twbs/bootstrap/issues/2054 is successful in changing the license to MIT (which can be re-licensed to GPL).

So considering the history of this attempt in the Drupalsphere, the license incompatibilities, and the overall problems, I don't think this can presently be considered.

luiselizondo commented 11 years ago

I wasn't aware of the GPL / Apache / MIT mess, I tried to read the post but it's really long. We'll need to wait for 3.1 to see if it includes a new license. In the meantime, is it possible to change the Backdrop license to MIT or GPL v3? If that's possible, then we wouldn't have a problem from what I've read.

I read a little bit about the markup problems on D.o but I do think is possible, I've currently have 2 Drupal websites using Bootstrap and 2 more on the oven.

Anyway, I respect all opinions on this matter, and I know is not gonna be easy, specially with the license. But I think we must consider that most of the comments at https://drupal.org/node/1801582 were written before Bootstrap 3 and many issues were fixed on Bootstrap 3.

luiselizondo commented 11 years ago

I see there's a proposal to Move to GPLv3. here https://github.com/backdrop/backdrop-issues/issues/45 That would solve the problem.

quicksketch commented 11 years ago

Moving to GPL 3 doesn't help with the situation (Apache still isn't compatible with GPL 3), and we don't have an option to move to MIT because it would require getting permission from every contributor who ever wrote code for Drupal (as mentioned in that issue).

rudiedirkx commented 11 years ago

I disagree. Theming is up to the developer. Backdrop should contain at least 1 admin theme. All the rest is up to the developer. There will be a /sites/all/themes/ (or hopefully soon /themes/) where you can store your base themes.

alexweber commented 11 years ago

Whereas I like the idea of not reinventing the wheel and using an established front-end framework, I'm partial to Zurb Foundation (mainainer on d.o) and I actually ported Shiny over as a Foundation sub-theme: https://drupal.org/sandbox/alexweber/2049517 It's been working pretty well at Blue Tent Marketing where I work. So @rudiedirkx I think that we can totally use Bootstrap/Foundation as the base theme and have admin themes using them too, it's actually really slick and pretty awesome to be able to use Joyrides, Sections, Reveals, etc in the admin theme.

rudiedirkx commented 11 years ago

Include it and use for admin theme = OK by me. That would make an excellent example of a Backdrop Bootstrap theme for theme developers.

kreynen commented 11 years ago

@quicksketch you have to be clear about which version of Apache and GPL you are referring to. Apache v1 or v1.1 was NOT compatible with GPLv2 or GPLv3, but according to http://www.gnu.org/licenses/license-list.html#apache2

*This is a free software license, compatible with version 3 of the GNU GPL.

Please note that this license is not compatible with GPL version 2, because it has some requirements that are not in that GPL version.*

Bootstrap uses Apache v2 https://github.com/twbs/bootstrap/blob/master/LICENSE

I don't have strong feeling about what code should be included in the core Backdrop package. I'm more concerned about having the freedom to decide which code from other projects I'd like to package with Backdrop (or any project I'm using) based on the code vs. the license.

I'll respond to some of the other GPLv3 concerns in issue #45

luiselizondo commented 11 years ago

@quicksketch I had the same feeling after reading https://github.com/twbs/bootstrap/issues/2054, GPLv3 and Apache v2 are compatible. And I do think Bootstrap will move eventually to a MIT License. Knowing all that I think it's useless to discuss about licensing issues, let's better move the discussion to weather we need to use a HTML/CSS framework, which one, and how to make Drupal markup compatible.

quicksketch commented 11 years ago

Okay, let's put licensing issues aside then if we're sure that Bootstrap is (or will be) GPL compatible. From a technical standpoint, I still see this as difficult to implement. Either you'd need to change/add an enormous number of classes or you'd need to modify Bootstrap to use existing class names. I'd love it if in the future, Bootstrap (or other libraries) were nothing but a SASS library that you could recompile with any class names you wanted, rather than having the hard-binding between class names and appearance.

I'd also love to have more themes in core, so if Bootstrap can overcome these doubts then I'm for it. But right now I can't see how it can fit into the project in a straightforward way.

luiselizondo commented 11 years ago

OK, this is probably going to sound a little crazy, but we could make some sort of transition.

If we remove all the Bootstrap elements that Drupal doesn't use, we're left with the following list:

  1. Tables
  2. Form elements
  3. Buttons
  4. Icons
  5. Dropdowns
  6. Navs
  7. Breadcrumbs
  8. Pagination
  9. Alerts
  10. Progress bars
  11. The grid system

OK, here's the crazy idea: what if we don't include the Bootstrap libraries but we change the classes in theme_* of everything but the grid system. We can even ship Backdrop with a new base theme that uses the grid system. I know it won't be useful, but we're already including a useful theme in D7 (stark).

What I'm proposing is the following list of tasks:

  1. Add necessary classes to elements. Maybe with a few exceptions, they will make no harm.
  2. Ship Backdrop with a bootstrap-capable base theme that uses the grid system (or make one in contrib that doesn't has to rewrite almost every theme_ function in core).
  3. Do not include the bootstrap library in core.
  4. Make it possible to exclude the core CSS files like system.css, user.css, etc
  5. When Boostrap changes the license, we can include it in a future release and remove/adapt the core CSS files.
cvrebert commented 10 years ago

I'd love it if in the future, Bootstrap (or other libraries) were nothing but a SASS library that you could recompile with any class names you wanted, rather than having the hard-binding between class names and appearance.

You can do that right now; just use LESS's mixins feature. If SASS is required, there's https://github.com/thomas-mcdonald/bootstrap-sass

quicksketch commented 10 years ago

use LESS's mixins feature.

Right, I'm aware that it could be done, but right now the selectors are all hard-coded in both the LESS and SASS versions of bootstrap. The only variables you have are for which colors and sprites you'd like to use: https://github.com/thomas-mcdonald/bootstrap-sass/blob/master/templates/project/_variables.scss

So I know Bootstrap could be rewritten to add this capability, but that's currently not the case, meaning we'd need to either use a heavily modified fork or wait for Bootstrap to support this functionality directly.

luiselizondo commented 10 years ago

I'm closing this one. If anyone wants to reopen it and discuss possible solutions I'll be happy.