1
0
Fork 0
mirror of https://github.com/twbs/bootstrap-sass.git synced 2022-11-09 12:27:02 -05:00

Merge branch 'master' into 3

Merge updates from master since I started working on 3.
This commit is contained in:
Thomas McDonald 2013-04-13 16:16:40 +01:00
commit 52b7f4869a
7 changed files with 51 additions and 21 deletions

View file

@ -1,13 +1,32 @@
# Changelog
# 2.1.1.0
## 2.3.0.0
* [#290] Update to Bootstrap 2.3.0 - *Tristan Harward*
* Fix `rake:debug` with new file locations - *Thomas McDonald*
* Add draft contributing document - *Thomas McDonald*
* [#260] Add our load path to the global Sass load path - *Tristan Harward*
* [#275] Use GitHub notation in Sass head testing gemfile - *Timo Schilling*
* [#279, #283] Readme improvements - *theverything, Philip Arndt*
## 2.2.2.0
* [#270] Update to Bootstrap 2.2.2 - *Tristan Harward*
* [#266] Add license to gemspec - *Peter Marsh*
## 2.2.1.1
* [#258] Use `bootstrap` prefix for `@import`ing files in `bootstrap/bootstrap.scss` - *Umair Siddique*
## 2.2.1.0
* [#246] Update to Bootstrap 2.2.1 - *Tristan Harward*
* [#246] Pull Bootstrap updates from jlong/sass-twitter-bootstrap - *Tristan Harward*
## 2.1.1.0
* Update to Bootstrap 2.1.1
* [#222] Remove 100% multiplier in vertical-three-colours
* [#227] Fix IE component animation collapse
* [#228] Fix variables documentation link
* [#231] Made .input-block-level a class as well as mixin
# 2.1.0.1
## 2.1.0.1
* [#219] Fix expected a color. Got: transparent.
* [#207] Add missing warning style for table row highlighting
* [#208] Use grid-input-span for input spans
@ -51,4 +70,4 @@ Things of note: static navbars now have full width. (to be fixed in 2.0.3) `.nav
* Modified `@mixin opacity()` to take an argument `0...1` rather than `0...100` to be consistent with Compass.
## 2.0.0
* Updated to Bootstrap 2.0.0
* Updated to Bootstrap 2.0.0

View file

@ -1,7 +1,7 @@
# bootstrap-sass 3.0!
Welcome to the 3 branch. This is living on the wild side of life.
Welcome to the 3 branch.
3 might be close to release, but stuff will break.
3 might be complete in places, but stuff will break.
This certainly won't be merged into master (and the commit messages will be horrible) since we will pull from jlong/sass-twitter-bootstrap as per usual, but this is an attempt so you can see and try out Bootstrap 3 with you application.

View file

@ -9,7 +9,7 @@ desc 'Dumps output to a CSS file for testing'
task :debug do
require 'sass'
require './lib/bootstrap-sass/compass_functions'
require './lib/bootstrap-sass/rails_functions'
require './lib/bootstrap-sass/sass_functions'
path = './vendor/assets/stylesheets'
%w(bootstrap).each do |file|
engine = Sass::Engine.for_file("#{path}/#{file}.scss", syntax: :scss, load_paths: [path])

View file

@ -3,20 +3,22 @@ module Bootstrap
# Inspired by Kaminari
def self.load!
if compass? && asset_pipeline?
register_compass_extension
register_rails_engine
elsif compass?
# Only require compass extension if a standalone project
if compass?
require 'bootstrap-sass/compass_functions'
register_compass_extension
elsif asset_pipeline?
require 'sass-rails' # See: https://github.com/thomas-mcdonald/bootstrap-sass/pull/4
require 'bootstrap-sass/sass_functions'
end
if rails?
require 'sass-rails'
register_rails_engine
require 'bootstrap-sass/rails_functions'
else
end
if !(rails? || compass?)
raise Bootstrap::FrameworkNotFound, "bootstrap-sass requires either Rails > 3.1 or Compass, neither of which are loaded"
end
stylesheets = File.expand_path(File.join("..", 'vendor', 'assets', 'stylesheets'))
::Sass.load_paths << stylesheets
end
@ -30,6 +32,10 @@ module Bootstrap
defined?(::Compass)
end
def self.rails?
defined?(::Rails)
end
def self.register_compass_extension
base = File.join(File.dirname(__FILE__), '..')
styles = File.join(base, 'vendor', 'assets', 'stylesheets')

View file

@ -1,14 +1,19 @@
# This contains functions for use with a project *only* using Compass.
module Sass::Script::Functions
# Define image_path for Compass to allow use of sprites without url() wrapper.
def image_path(asset)
if defined?(::Compass)
image_url(asset, Sass::Script::Bool.new(true))
def image_path(source, options = {})
if defined?(::Sprockets)
::Sass::Script::String.new sprockets_context.image_path(source.value).to_s, :string
elsif defined?(::Compass)
image_url(source, Sass::Script::Bool.new(true))
else
# Revert to the old compass-agnostic path determination
asset_sans_quotes = asset.value.gsub('"', '')
asset_sans_quotes = source.value.gsub('"', '')
Sass::Script::String.new("/images/#{asset_sans_quotes}", :string)
end
end
protected
def sprockets_context # :nodoc:
options[:custom][:sprockets_context]
end
end

View file

@ -4,4 +4,4 @@ require 'test/unit'
require 'sass'
require 'lib/bootstrap-sass/compass_functions'
require 'lib/bootstrap-sass/rails_functions'
require 'lib/bootstrap-sass/sass_functions'