merge from stable branch
This commit is contained in:
commit
275bb0762f
@ -31,8 +31,12 @@ The Documentation for the [latest preview release](http://beta.compass-style.org
|
||||
* [Vertical Rhythm Module] The `establish-baseline` mixin now styles the
|
||||
`<html>` element instead of the `<body>` element. This makes the
|
||||
vertical rhythm module work better with `rem` based measurements.
|
||||
* [CSS3] Add 3D transform support for Mozillia, IE, and Opera.
|
||||
* [CSS3] Add `-ms` support for css3 columns. Add support for the columns shorthand property.
|
||||
* [CSS3] Added 3D transform support for Mozillia, IE, and Opera.
|
||||
* [CSS3] Added `-ms` support for css3 columns. Add support for the columns shorthand property.
|
||||
* [CLI] Added a `-I` option for adding sass import paths via the CLI during compilation and project set up.
|
||||
* [Configuration] For better ruby and rails integration, the `add_import_path` command now accepts
|
||||
[Sass::Importer](http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#custom_importers) objects
|
||||
and [Ruby Pathname](http://www.ruby-doc.org/stdlib-1.9.3/libdoc/pathname/rdoc/Pathname.html) objects.
|
||||
|
||||
0.12.1 (03/14/2012)
|
||||
-------------------
|
||||
|
@ -91,7 +91,7 @@ layout: homepage
|
||||
%img(src="/images/compass.app.png")
|
||||
%p
|
||||
Buy <a href="http://compass.handlino.com/">Compass.app</a>
|
||||
for Windows and Mac for just $7.
|
||||
for Windows and Mac for just $10.
|
||||
%p.note
|
||||
Note: Compass.app is a product of Handlino, Inc but
|
||||
30% of all proceeds go to Compass's charity of choice: <a href="http://umdf.org/compass">UMDF.org</a>.
|
||||
|
@ -18,7 +18,7 @@ documented_functions:
|
||||
%p
|
||||
These color functions are useful for creating generic libraries that have to accept a
|
||||
range of inputs. For more color functions see
|
||||
<a href="http://sass-lang.com/yardoc/Sass/Script/Functions.html">the sass reference
|
||||
<a href="http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html">the sass reference
|
||||
documentation</a>
|
||||
|
||||
#adjust-lightness.helper
|
||||
|
@ -1,9 +1,12 @@
|
||||
@import "shared";
|
||||
|
||||
// Change the appearance for Mozilla, Webkit and the future
|
||||
// Change the appearance for Mozilla, Webkit and possibly the future.
|
||||
// The appearance property is currently not present in any newer CSS specification.
|
||||
//
|
||||
// @param $ap
|
||||
// [ none | normal | icon | window | button | menu | field ]
|
||||
// There is no official list of accepted values, but you might check these source:
|
||||
// Mozilla : https://developer.mozilla.org/en/CSS/-moz-appearance
|
||||
// Webkit : http://code.google.com/p/webkit-mirror/source/browse/Source/WebCore/css/CSSValueKeywords.in?spec=svnf1aea559dcd025a8946aa7da6e4e8306f5c1b604&r=63c7d1af44430b314233fea342c3ddb2a052e365
|
||||
// (search for 'appearance' within the page)
|
||||
|
||||
@mixin appearance($ap) {
|
||||
$ap: unquote($ap);
|
||||
|
@ -67,8 +67,8 @@
|
||||
|
||||
// Reset the font and vertical alignment.
|
||||
@mixin reset-font {
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
font-size: 100%;
|
||||
vertical-align: baseline; }
|
||||
|
||||
// Resets the outline when focus.
|
||||
|
@ -69,7 +69,11 @@ $base-half-leader: $base-leader / 2;
|
||||
}
|
||||
}
|
||||
|
||||
// resets the baseline to 1 leading unit
|
||||
// Resets the line-height to 1 vertical rhythm unit.
|
||||
// Does not work on elements whose font-size is different from $base-font-size.
|
||||
//
|
||||
// @deprecated This mixin will be removed in the next release.
|
||||
// Please use the `adjust-leading-to` mixin instead.
|
||||
@mixin reset-baseline {
|
||||
@include adjust-leading-to(1, if($relative-font-sizing, $base-font-size, $base-font-size));
|
||||
}
|
||||
@ -109,12 +113,13 @@ $base-half-leader: $base-leader / 2;
|
||||
// Calculate rhythm units.
|
||||
@function rhythm(
|
||||
$lines: 1,
|
||||
$font-size: $base-font-size
|
||||
$font-size: $base-font-size,
|
||||
$offset: 0
|
||||
) {
|
||||
@if not $relative-font-sizing and $font-size != $base-font-size {
|
||||
@warn "$relative-font-sizing is false but a relative font size was passed to the rhythm function";
|
||||
}
|
||||
$rhythm: $font-unit * $lines * $base-line-height / $font-size;
|
||||
$rhythm: $font-unit * ($lines * $base-line-height - $offset) / $font-size;
|
||||
// Round the pixels down to nearest integer.
|
||||
@if unit($rhythm) == px {
|
||||
$rhythm: floor($rhythm);
|
||||
@ -181,7 +186,7 @@ $base-half-leader: $base-leader / 2;
|
||||
style: $border-style;
|
||||
width: $font-unit * $width / $font-size;
|
||||
};
|
||||
padding-#{$side}: $font-unit / $font-size * ($lines * $base-line-height - $width);
|
||||
padding-#{$side}: rhythm($lines, $font-size, $offset: $width);
|
||||
}
|
||||
|
||||
// Apply borders and whitespace equally to all sides.
|
||||
@ -193,7 +198,7 @@ $base-half-leader: $base-leader / 2;
|
||||
style: $border-style;
|
||||
width: $font-unit * $width / $font-size;
|
||||
};
|
||||
padding: $font-unit / $font-size * ($lines * $base-line-height - $width);
|
||||
padding: rhythm($lines, $font-size, $offset: $width);
|
||||
}
|
||||
|
||||
// Apply a leading border.
|
||||
|
@ -22,7 +22,7 @@ $default-has-layout-approach: zoom !default;
|
||||
}
|
||||
|
||||
@mixin has-layout-zoom {
|
||||
@if $legacy-support-for-ie {
|
||||
@if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
|
||||
*zoom: 1;
|
||||
}
|
||||
}
|
||||
|
@ -13,8 +13,13 @@ module Compass
|
||||
Compass::Frameworks::ALL.each do |framework|
|
||||
locations << [framework.stylesheets_directory, File.join(css_path || css_dir || ".", framework.name)]
|
||||
end
|
||||
load_paths = []
|
||||
resolve_additional_import_paths.each do |additional_path|
|
||||
locations << [additional_path, File.join(css_path || css_dir || ".", File.basename(additional_path))]
|
||||
if additional_path.is_a?(String)
|
||||
locations << [additional_path, File.join(css_path || css_dir || ".", File.basename(additional_path))]
|
||||
else
|
||||
load_paths << additional_path
|
||||
end
|
||||
end
|
||||
plugin_opts = {:template_location => locations}
|
||||
plugin_opts[:style] = output_style if output_style
|
||||
@ -23,13 +28,14 @@ module Compass
|
||||
plugin_opts[:cache_location] = cache_path unless cache_path.nil?
|
||||
plugin_opts.merge!(sass_options || {})
|
||||
plugin_opts[:load_paths] ||= []
|
||||
plugin_opts[:load_paths] += load_paths
|
||||
plugin_opts[:load_paths] << Compass::SpriteImporter.new
|
||||
plugin_opts
|
||||
end
|
||||
|
||||
def resolve_additional_import_paths
|
||||
(additional_import_paths || []).map do |path|
|
||||
if project_path && !absolute_path?(path)
|
||||
if path.is_a?(String) && project_path && !absolute_path?(path)
|
||||
File.join(project_path, path)
|
||||
else
|
||||
path
|
||||
|
@ -79,6 +79,7 @@ module Compass
|
||||
end
|
||||
|
||||
def add_import_path(*paths)
|
||||
paths.map!{|p| defined?(Pathname) && Pathname === p ? p.to_s : p}
|
||||
# The @added_import_paths variable works around an issue where
|
||||
# the additional_import_paths gets overwritten during parse
|
||||
@added_import_paths ||= []
|
||||
|
@ -26,6 +26,13 @@ module Compass::Exec::GlobalOptionsParser
|
||||
::Compass.configuration.discover Pathname.new(frameworks_dir).realpath
|
||||
end
|
||||
|
||||
opts.on('-I IMPORT_PATH',
|
||||
"Makes files under the IMPORT_PATH folder findable by Sass's @import directive."
|
||||
) do |import_path|
|
||||
require 'pathname'
|
||||
::Compass.configuration.add_import_path Pathname.new(import_path).realpath
|
||||
end
|
||||
|
||||
opts.on('-q', '--quiet', :NONE, 'Quiet mode.') do
|
||||
self.options[:quiet] = true
|
||||
end
|
||||
@ -34,7 +41,7 @@ module Compass::Exec::GlobalOptionsParser
|
||||
self.options[:trace] = true
|
||||
end
|
||||
|
||||
opts.on('--force', :NONE, 'Allows some failing commands to succeed instead.') do
|
||||
opts.on('--force', :NONE, 'Allows compass to overwrite existing files.') do
|
||||
self.options[:force] = true
|
||||
end
|
||||
|
||||
|
@ -108,7 +108,7 @@ module Compass::SassExtensions::Functions::Sprites
|
||||
unless VALID_SELECTORS.include?(selector.value)
|
||||
raise Sass::SyntaxError, "Invalid Selctor did you mean one of: #{VALID_SELECTORS.join(', ')}"
|
||||
end
|
||||
Sass::Script::Bool.new map.send(:"has_#{selector.value}?", sprite)
|
||||
Sass::Script::Bool.new map.send(:"has_#{selector.value}?", sprite.value)
|
||||
end
|
||||
|
||||
Sass::Script::Functions.declare :sprite_has_selector, [:map, :sprite, :selector]
|
||||
|
@ -14,8 +14,8 @@ time, mark, audio, video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
font-size: 100%;
|
||||
vertical-align: baseline; }
|
||||
|
||||
body {
|
||||
|
@ -240,6 +240,21 @@ EXPECTED
|
||||
assert_correct expected_serialization.split("\n"), Compass.configuration.serialize.split("\n")
|
||||
end
|
||||
|
||||
def test_additional_import_paths_can_be_importers
|
||||
contents = StringIO.new(<<-CONFIG)
|
||||
http_path = "/"
|
||||
project_path = "/home/chris/my_compass_project"
|
||||
css_dir = "css"
|
||||
additional_import_paths = ["../foo"]
|
||||
add_import_path Sass::Importers::Filesystem.new("/tmp/foo")
|
||||
CONFIG
|
||||
|
||||
Compass.add_configuration(contents, "test_additional_import_paths")
|
||||
|
||||
assert Compass.configuration.sass_load_paths.find{|p| p.is_a?(Sass::Importers::Filesystem) && p.root == "/tmp/foo"}
|
||||
assert Compass.configuration.to_sass_plugin_options[:load_paths].find{|p| p.is_a?(Sass::Importers::Filesystem) && p.root == "/tmp/foo"}
|
||||
end
|
||||
|
||||
def test_config_with_pathname
|
||||
contents = StringIO.new(<<-CONFIG)
|
||||
http_path = "/"
|
||||
|
Loading…
Reference in New Issue
Block a user