compass-core 1.0.0.rc.0 → 1.0.0.rc.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f2436a49f793bbb4e3ec4db31644b58dde0718ab
4
- data.tar.gz: ad86cda8d6d023ede92ae8357b63aba1868ce851
3
+ metadata.gz: 0bdf3ed83a110afaf4b21a9a95d35ab21f30005d
4
+ data.tar.gz: 16db580b6ea1afe477b6d77dd5704f60999cb121
5
5
  SHA512:
6
- metadata.gz: cd83e5ffd719e8e4d6903c0db9fa32a86d018aefc9cdf6387c768f759255bf991d17a711e308bbb3fa305348442146b50159f736942380d951590b19c839f15e
7
- data.tar.gz: 4e9872e647246151d51f10e1df2d06f19b4203fcfa1d355853432fc5bc9b448e287d6f2612bcfb591de6b439dfc126eebe2a6d91deebd71cf9431f4e011fc617
6
+ metadata.gz: 2d731a439ad9191b6ccfbe09316aabdd1076116797d3abd8ae81198f42c82899cea0465bdfda82d4dfcbbf77bbd82c46474293bd1a6d84b6cb61e9b5133743d9
7
+ data.tar.gz: da17ecf2006a0349ee5830914fc6d38693f8eddcd1358cab1938e267718304ecd454eacde0eaeb940493fb1994daf91713c973cf2d4d1a239cb196df2121cb73
@@ -6,7 +6,9 @@ module Compass
6
6
 
7
7
  SIMPLE_FUNCTIONS = {
8
8
  "image" => %w(webkit),
9
- "cross-fade" => %w(webkit)
9
+ "cross-fade" => %w(webkit),
10
+ "repeating-linear-gradient" => %w(webkit moz), # Hacky implementation
11
+ "repeating-radial-gradient" => %w(webkit moz) # Hacky implementation
10
12
  }
11
13
 
12
14
  # Adds support for one or more aspects for the given simple function
@@ -168,6 +168,6 @@ module Compass
168
168
  end
169
169
  end
170
170
 
171
- %w(defaults inheritance paths data watch).each do |lib|
171
+ %w(defaults inheritance paths data watch adapters).each do |lib|
172
172
  require "compass/configuration/#{lib}"
173
173
  end
@@ -0,0 +1,101 @@
1
+ module Compass
2
+ module Configuration
3
+ # The adapters module provides methods that make configuration data from a compass project
4
+ # adapt to various consumers of configuration data
5
+ module Adapters
6
+ def to_compiler_arguments(additional_options = {})
7
+ engine_opts = to_sass_engine_options.merge(additional_options)
8
+ # we have to pass the quiet option in the nested :sass hash to disambiguate it from the compass compiler's own quiet option.
9
+ if engine_opts.has_key?(:quiet)
10
+ engine_opts[:sass] ||= {}
11
+ engine_opts[:sass][:quiet] = engine_opts.delete(:quiet)
12
+ end
13
+ [project_path, sass_path, css_path, engine_opts]
14
+ end
15
+
16
+ def to_sass_plugin_options
17
+ locations = []
18
+ locations << [sass_path, css_path] if sass_path && css_path
19
+ Compass::Frameworks::ALL.each do |framework|
20
+ locations << [framework.stylesheets_directory, File.join(css_path || css_dir || ".", framework.name)]
21
+ end
22
+ plugin_opts = {:template_location => locations}
23
+ plugin_opts[:style] = output_style if output_style
24
+ plugin_opts[:line_comments] = line_comments
25
+ if sass_3_4?
26
+ plugin_opts[:sourcemap] = sourcemap ? :auto : :none
27
+ else
28
+ plugin_opts[:sourcemap] = sourcemap
29
+ end
30
+ plugin_opts[:cache] = cache unless cache.nil?
31
+ plugin_opts[:cache_location] = cache_path unless cache_path.nil?
32
+ plugin_opts[:quiet] = disable_warnings if disable_warnings
33
+ plugin_opts[:compass] = {}
34
+ plugin_opts[:compass][:environment] = environment
35
+ plugin_opts.merge!(sass_options || {})
36
+ plugin_opts[:load_paths] ||= []
37
+ plugin_opts[:load_paths] += resolve_additional_import_paths
38
+ plugin_opts[:load_paths] << Compass::SpriteImporter.new
39
+ plugin_opts[:full_exception] = (environment == :development)
40
+ plugin_opts
41
+ end
42
+
43
+ def resolve_additional_import_paths
44
+ (additional_import_paths || []).map do |path|
45
+ if path.is_a?(String) && project_path && !absolute_path?(path)
46
+ File.join(project_path, path)
47
+ else
48
+ path
49
+ end
50
+ end
51
+ end
52
+
53
+ def absolute_path?(path)
54
+ # Pretty basic implementation
55
+ path.index(File::SEPARATOR) == 0 || path.index(':') == 1
56
+ end
57
+
58
+ def to_sass_engine_options
59
+ engine_opts = {:load_paths => sass_load_paths}
60
+ engine_opts[:style] = output_style if output_style
61
+ engine_opts[:line_comments] = line_comments
62
+ if sass_3_4?
63
+ engine_opts[:sourcemap] = sourcemap ? :auto : :none
64
+ else
65
+ engine_opts[:sourcemap] = sourcemap
66
+ end
67
+ engine_opts[:cache] = cache
68
+ engine_opts[:cache_location] = cache_path
69
+ engine_opts[:quiet] = disable_warnings if disable_warnings
70
+ engine_opts[:compass] = {}
71
+ engine_opts[:compass][:environment] = environment
72
+ engine_opts[:full_exception] = (environment == :development)
73
+ engine_opts.merge!(sass_options || {})
74
+ end
75
+
76
+ def sass_load_paths
77
+ load_paths = []
78
+ load_paths << sass_path if sass_path
79
+ Compass::Frameworks::ALL.each do |f|
80
+ load_paths << f.stylesheets_directory if File.directory?(f.stylesheets_directory)
81
+ end
82
+ importer = sass_options[:filesystem_importer] if sass_options && sass_options[:filesystem_importer]
83
+ importer ||= Sass::Importers::Filesystem
84
+ load_paths += resolve_additional_import_paths
85
+ load_paths.map! do |p|
86
+ next p if p.respond_to?(:find_relative)
87
+ importer.new(p.to_s)
88
+ end
89
+ load_paths << Compass::SpriteImporter.new
90
+ load_paths
91
+ end
92
+
93
+ def sass_3_4?
94
+ Sass.version[:major] == 3 && Sass.version[:minor] == 4
95
+ end
96
+ end
97
+ class Data
98
+ include Adapters
99
+ end
100
+ end
101
+ end
@@ -1,5 +1,5 @@
1
1
  module Compass
2
2
  module Core
3
- VERSION = "1.0.0.rc.0"
3
+ VERSION = "1.0.0.rc.1"
4
4
  end
5
5
  end
@@ -420,7 +420,7 @@ $css-sel2-support-threshold: $critical-usage-threshold !default;
420
420
  $old-variable-warnings-issued: warn-about-old-variables() !default;
421
421
 
422
422
  // @private
423
- $pie-removal-warnging-issued: warn-about-pie-removal() !default;
423
+ $pie-removal-warning-issued: warn-about-pie-removal() !default;
424
424
 
425
425
  // @private
426
426
  @function warn-about-useless-prefix-arguments($moz: null, $webkit: null, $o: null, $khtml: null, $official: null) {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compass-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc.0
4
+ version: 1.0.0.rc.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Eppstein
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-08-01 00:00:00.000000000 Z
14
+ date: 2014-08-04 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: sass
@@ -89,6 +89,7 @@ files:
89
89
  - lib/compass-core.rb
90
90
  - lib/compass/browser_support.rb
91
91
  - lib/compass/configuration.rb
92
+ - lib/compass/configuration/adapters.rb
92
93
  - lib/compass/configuration/data.rb
93
94
  - lib/compass/configuration/defaults.rb
94
95
  - lib/compass/configuration/inheritance.rb