New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
merging? #25
Comments
I've just spent the last couple of hours updating my 2.0 branch to 2.0-wip head after reading this thread on the twitter-bootstrap group. 😓 In response to your points, I'd like to see bootstrap-sass moving towards closer integration and coupling with Rails, rather than relying on an intermediary framework. I'd also rather not deviate too far from Bootstrap wherever possible, with the SCSS being as close to the original LESS where I can. It seems that your aims with your conversion differ somewhat significantly, and I think it would change the direction in which bootstrap-sass is currently headed. As an aside, I'm fairly sure there are at least 100 forks of Bootstrap in a SASS form. |
Yeah theres definitely way too many :) Theres also this and this too. I was thinking this was more of a scss port with rails option :) I'm definitely keeping with the original Bootstrap content, though I added a sub-folder for patterns etc so it was easier to find stuff, and to add a bootstrap/patterns file to load them all (the way it is originally you'd have to import all of them separately unless you are using the whole library). As for compass, I've set it up so you can use it outside of rails, but definitely doesn't have a dependency on it (all the mixins for css3 etc are the direct ports). I'd prefer not to have compass as a requirement either. Definitely seems like there should be some collaboration going on as far as maintaining a scss port, it would make it considerably easier to maintain :) Id imagine a pure scss port with rails pipeline option for use in rails apps. I replied to that one thread you linked mentioning it. |
@brentkirby, changing the organization and deviating from the original Bootstrap is a bad idea for a direct port, I believe. But a version without Rails is essential for many, including myself, and I'd love to collaborate on bringing it together. @thomas-mcdonald, what do you say? |
I'll admit to knowing very little about cross-framework SASS - bootstrap-sass was originally created just as a way of experimentation, for me to get used to SASS and it's concepts. Outside of sass-rails and the Rails stack I've not really used SASS. So, having said that, if bootstrap-sass is going to go cross-platform, I'm going to need a hand. What's the best way of setting sass stylesheets up for cross-platform use, will it fuck with the Rails asset pipeline and does it install a ton of extra dependencies? If we're going cross-platform I want the 'Rails experience' of 'drop it in your Gemfile and go' to still be intact since that was the original intention of the gem. Adding Rails-only features and helpers will still happen, I'll just have to conditionally require them, I guess. |
I'm cool with that :) Bootstrap is pretty lightweight so thats not too bad. I'm hoping they actually extract it out a little more so you can pretty much avoid any extra css unless you are actually using a particular feature/features. Also hoping they add some more configuration options (and more meaningful ones (buttonColor instead of simply "blue" :) ) which was the only other change I had started. I do tons of rails dev but also like the idea of rails being optional. Its easy enough to include the engine (and then setup load paths, as well as any helpers etc if you want them) if rails is available. If not, just make sure the files are available to sass. |
All of the scss files can just be created as partials (_something.scss) and stored somewhere besides app/assets or vendor/ (otherwise I believe rails / sprockets will try to pick them up). Unless something has changed, as far as I know sprockets doesn't like them without the .css.scss naming convention. To make them available to rails, in the engine just add: config.sass.load_paths << path_to_the_stylesheets_dir That will make the partials directly available to sass and you can include them in your application.css.scss file and so on. Since you really only import them as needed, sprockets doesn't really need to know or care about them, as long as sass does. The images you could probably just place in vendor/assets/images, or add them in with So for example, you could store all of the .scss files in @import 'bootstrap/partial_name'; In your files. If you wanted to make it compatible with compass, something like the following should do the trick: begin
require 'compass'
Compass::Frameworks.register('bootstrap', :stylesheets_directory => path_to_stylesheets, :templates_directory => '')
rescue LoadError
end templates_directory is optional, if you wanted to actually have it function as an official compass extension and include other assets (good if you're including any bootstrap images). |
@thomas-mcdonald, fair enough. So it would be better to find another place to collaborate and port it where it wouldn't get obfuscated by rails. I don't see the rails integration as a part of a Twitter Bootstrap port from .less to .scss? |
@brentkirby Thanks for that, I appreciate it. It's clear I'll need to do some reading and experimenting first. Hopefully it can be sorted out for Bootstrap 2.0 in 'a few weeks.' @oskarrough No, not really, it just means the Rails helpers and such will only get included if Rails is defined; other frameworks and such wouldn't know it existed. I'm only talking about simple helpers to simplify the somewhat verbose (in places) Bootstrap markup. |
If you ignore my changes to the actual scss files/structure this branch should work with and without rails (optionally compass). If you did want to try and work on this I can fork a copy from here and merge in the rails specific stuff, just let me know! I am actually using it in a rails app now so I know that aspect of it works. I'd definitely love to put some helpers together for it as well as I think that would be helpful. That would make it easier to use than having to reference the site for html markup / classes etc... and easier to maintain when they hopefully get more semantic with their markup.... :) |
Bootstrap combined with Rails or some other framework sounds really nice. Although I haven't got any knowledge of Rails or the like. They I definitely see the use for Bootstrap+backend framework, I'm just trying to say that it's not really related to the port of Bootstrap? :-) |
@oskarrough I'd agree, though since sass is such a first class citizen in rails these days I'd think its important. I'm hoping somehow (whether here or elsewhere) people could combine some effort in maintaining a more official sass port :) Keeping everything together would probably help that cause a little (so you don't end up with additional forks for rails / compass / and so on) As long as the .gemspec doesn't require rails etc, you can easily store it all in the single gem without creating any headaches for non rails users. Same goes for compass if you wanted to allow it to be used as a compass extension but without that requirement. A good example is compass itself. Compass works with Rails 3.1 (pipeline) and Rails < 3.1, as well as standalone but doesn't require rails or anything (other than what it explicitly needs like chunky-png) be installed. |
Okay, so we'll move towards being framework agnostic. Since we have repurposed this ticket somewhat I think we should move the discussion about architecture etc. into #26. |
So I was working on something just like this for Bootstrap 2 and then found yours :) I've got a repository here (I've mostly focused on 2.0) setup which works both with and without rails (so you could use it with compass in non-rails projects).
Would you be interested in just merging them for bootstrap 2 development? Having 100 forks of bootstrap for sass just seems silly since it would be better maintained together.
I was planning on possibly extracting out some of the patterns a little better (so you could load bootstrap/patterns for all, or bootstrap/patterns/pattern for specific ones) as well as possibly setup a few additional variables so its easier to configure (instead of just changing blue/black etc since maybe you don't want blue or black buttons :) ). I also sub-moduled twitter's repository to track their updates easier with a quick rake task that updates the submodule and copies over the javascripts etc.
If you'd like to do so just let me know and I can take a sec and fork your 2.0 branch and marge in some updates.
The text was updated successfully, but these errors were encountered: