Comments (12)
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.
from bootstrap-sass.
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.
from bootstrap-sass.
@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?
from bootstrap-sass.
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.
from bootstrap-sass.
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.
from bootstrap-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 config.paths['app/assets'] << path_to_images
So for example, you could store all of the .scss files in lib/stylesheets/bootstrap
, then use
@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).
from bootstrap-sass.
@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?
from bootstrap-sass.
@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.
from bootstrap-sass.
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.... :)
from bootstrap-sass.
Bootstrap combined with Rails or some other framework sounds really nice. Although I haven't got any knowledge of Rails or the like.
They could
(but probably shouldn't) probably work side-by-side in the same repository, but for people only interested in Bootstrap and not any specific backend-framework, it would only clutter the project of porting it to Sass.
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? :-)
from bootstrap-sass.
@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.
from bootstrap-sass.
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.
from bootstrap-sass.
Related Issues (20)
- Bug on collapse HOT 1
- sass::syntaxerror Undefined mixin 'border-radius'
- php bin/console assetic:dump --env prod causes error
- Build fails: Unclosed string HOT 1
- Deprecation warnings with `Dart Sass 1.33.0` HOT 8
- Bootstrap-sass v3.3.7 generates a "Using / for division is deprecated and will be removed in Dart Sass 2.0.0." warning when using laravel mix HOT 1
- tooltip inside modal window, on hover of the element scroll bar goes to top - blocker
- math.div changes applied to non-division variables HOT 6
- Compatibility with gulp-sass 4.1.1 broken with bootstrap-sass 3.4.3 and 3.4.2 HOT 24
- Wrong use of Math.div. Breaks compilation HOT 1
- Update packagist for 3.4.3 HOT 7
- 3.4.2 has breaking change math.div HOT 3
- Grunt compass:dist task failing due to Invalid CSS in bootstrap-sass-official/assets/stylesheets/bootstrap/_variables.scss HOT 4
- Font glyphicons is affecting performance HOT 1
- Issue with tooltip
- Removal of sassc dependency HOT 5
- Well, it's only shown if it was already open: if (this._isShown()) {
- Fakeout
- Feature: Additional utilities for width and height property
- [WARNING] Expected ")" to end URL token [css-syntax-error]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootstrap-sass.