Sorry I'll post a patch in the future. Here's some additional work I did - you probably want to replace the whole directory with this code. It's nowhere near finished but its an improvement.

It assumes that a subtheme loads the bootstrap lib. I'll post more thoughts later tonight.

Any chance I can get git access? I'm interested in working on this with you.

Thanks,
Ben

CommentFileSizeAuthor
omega_bootstrap.tgz152 bytesbensnyder

Comments

realityloop’s picture

Status: Active » Needs work

this just contains a symlink file??

iaminawe’s picture

Please post your code and would be happy to test it out. As pointed out by realityloop, the tar just contains a symlink. Thanks

rerooting’s picture

sounds good, if someone wants to take over this project, let me know. I have decided to abandon this project as I consider it unnecessary.

rerooting’s picture

Ben, I have given you git access, take it!

rerooting’s picture

Also, a quick suggestion for folks is to use the less module with this, and to compile it with your own variables.less file, and to include your contrib .less in the bootstrap.less file. This makes it way easier to use existing parametric mixins, custom variables, and other awesome things that are already built into boostrap as you use it. I did this with the twitter_boostrap theme and it made my life a million times easier! There's really no need to go around using LESS, it makes things go much more smoothly.

bensnyder’s picture

@rerooting: thanks! I'll spend some time and do what I can this weekend.

I have primarily switched to SASS/Compass as I've found it to be waaaaay, waaay better and easier.

I'll likely create two branches: one to post the updated code, LESS based. One for SASS/COMPASS. Omega 4.x is switching to SASS so this will likely be the way forward.

More to come. Stay tuned.

rerooting’s picture

A bit off topic, but how is SASS/COMPASS easier? Just wondering. I use LESS with Omega almost exclusively now.

bensnyder’s picture

Take this code as a sample:

.tabs {
  @extend .nav;
  @extend .nav-tabs;
}

.menu {
  @extend .nav;
}

.links {
  @extend .nav;
}

.links.inline {
  @extend .nav;
  @extend .nav-pills;
}

.action-links {
  @extend .nav;
  @extend .nav-pills;
}


#navbar {
  //@extend .navbar-fixed-top;
  li.expanded {
    @extend .dropdown;
    a:hover {
      color:#fff !important;
    }
    .menu {
      display:none;
      @extend .dropdown-menu;
      left:0;
      li {
        float:none;
      }
    }
    &:hover > .menu {
      display:block;
    }
  }
}

#block-menu-block-1 .menu {
  @extend .nav;
  @extend .nav-tabs;
  @extend .nav-stacked;
}

No need to change the markup. Just extend! Plus I prefer to run "compass watch" on the server, rather than having Drupal do the work.

rerooting’s picture

So @extend is just like mixins in LESS, so for example I can do with bootstrap + LESS :

aside {
.well;
}

or I had to do this originally, because overriding default node links templates was a pain:

ul li.read-more a {
.btn;
.btn-primary;
.btn-large;
}

Though I find that this approach leads to a bunch of extra css after you compile, and is a hack compared to just getting those css classes in there in the markup. On our new site, which I built using this approach: http://flywheelcollective.com, I used the core_library module to minify and gzip all the stylesheets because I had to use these workarounds to make a quick deadline on launching it.

Basically, SASS, Stylus and LESS all do the same thing in different ways (great blog post discussing this - http://net.tutsplus.com/tutorials/html-css-techniques/sass-vs-less-vs-st... ). I just like using LESS with bootstrap because you can do lots of fun stuff with what Bootstrap already provides, and extend it to create new components, javascript widgets and mixins. I use SASS with ruby projects and sometimes use Stylus for specific node.js frameworks we use as well.

As far as having drupal do the work, I've never experienced substantial slow-downs, and plus drupal doesn't have to do the work once the site goes into production.

I guess I'm just a javascript lover, so LESS is my favorite :)

bensnyder’s picture

Status: Needs work » Closed (won't fix)
rerooting’s picture

Update: It looks like Omega 4.x will actually be a good candidate for this. Go for it!

bensnyder’s picture

I'm planning on it :)... Taking on 2 new simultaneous projects soon and this project will get a lot of love.