sass 3.3.0.alpha.195 → 3.3.0.alpha.196
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/REVISION +1 -1
- data/VERSION +1 -1
- data/VERSION_DATE +1 -1
- data/lib/sass.rb +7 -4
- data/lib/sass/cache_stores/base.rb +1 -1
- data/lib/sass/css.rb +1 -1
- data/lib/sass/exec.rb +2 -2
- data/lib/sass/features.rb +2 -3
- data/lib/sass/media.rb +3 -3
- data/lib/sass/plugin/configuration.rb +3 -4
- data/lib/sass/script/functions.rb +44 -42
- data/lib/sass/script/lexer.rb +1 -1
- data/lib/sass/script/parser.rb +1 -1
- data/lib/sass/script/tree/funcall.rb +1 -1
- data/lib/sass/script/tree/interpolation.rb +6 -6
- data/lib/sass/script/tree/literal.rb +2 -1
- data/lib/sass/script/value/color.rb +3 -3
- data/lib/sass/script/value/number.rb +3 -4
- data/lib/sass/selector.rb +3 -5
- data/lib/sass/selector/simple_sequence.rb +3 -3
- data/lib/sass/source/map.rb +1 -1
- data/lib/sass/supports.rb +8 -9
- data/lib/sass/tree/css_import_node.rb +3 -3
- data/lib/sass/tree/each_node.rb +1 -1
- data/lib/sass/tree/extend_node.rb +1 -1
- data/lib/sass/tree/media_node.rb +1 -1
- data/lib/sass/tree/return_node.rb +2 -1
- data/lib/sass/tree/rule_node.rb +2 -1
- data/lib/sass/tree/trace_node.rb +2 -1
- data/lib/sass/tree/visitors/cssize.rb +1 -1
- data/lib/sass/tree/visitors/to_css.rb +1 -1
- data/lib/sass/util.rb +3 -3
- data/lib/sass/version.rb +1 -1
- metadata +9 -9
data/REVISION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3815575f97174247159cff208be7ef0d7feed874
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.3.0.alpha.
|
1
|
+
3.3.0.alpha.196
|
data/VERSION_DATE
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
02 July 2013 23:14:47 GMT
|
data/lib/sass.rb
CHANGED
@@ -19,7 +19,7 @@ require 'sass/version'
|
|
19
19
|
module Sass
|
20
20
|
# The global load paths for Sass files. This is meant for plugins and
|
21
21
|
# libraries to register the paths to their Sass stylesheets to that they may
|
22
|
-
# be `@imported`. This load path is used by every instance of
|
22
|
+
# be `@imported`. This load path is used by every instance of {Sass::Engine}.
|
23
23
|
# They are lower-precedence than any load paths passed in via the
|
24
24
|
# {file:SASS_REFERENCE.md#load_paths-option `:load_paths` option}.
|
25
25
|
#
|
@@ -56,9 +56,6 @@ module Sass
|
|
56
56
|
|
57
57
|
# Compile a file on disk to CSS.
|
58
58
|
#
|
59
|
-
# @param filename [String] The path to the Sass, SCSS, or CSS file on disk.
|
60
|
-
# @param options [{Symbol => Object}] An options hash;
|
61
|
-
# see {file:SASS_REFERENCE.md#sass_options the Sass options documentation}
|
62
59
|
# @raise [Sass::SyntaxError] if there's an error in the document
|
63
60
|
# @raise [Encoding::UndefinedConversionError] if the source encoding
|
64
61
|
# cannot be converted to UTF-8
|
@@ -67,11 +64,17 @@ module Sass
|
|
67
64
|
# @overload compile_file(filename, options = {})
|
68
65
|
# Return the compiled CSS rather than writing it to a file.
|
69
66
|
#
|
67
|
+
# @param filename [String] The path to the Sass, SCSS, or CSS file on disk.
|
68
|
+
# @param options [{Symbol => Object}] An options hash;
|
69
|
+
# see {file:SASS_REFERENCE.md#sass_options the Sass options documentation}
|
70
70
|
# @return [String] The compiled CSS.
|
71
71
|
#
|
72
72
|
# @overload compile_file(filename, css_filename, options = {})
|
73
73
|
# Write the compiled CSS to a file.
|
74
74
|
#
|
75
|
+
# @param filename [String] The path to the Sass, SCSS, or CSS file on disk.
|
76
|
+
# @param options [{Symbol => Object}] An options hash;
|
77
|
+
# see {file:SASS_REFERENCE.md#sass_options the Sass options documentation}
|
75
78
|
# @param css_filename [String] The location to which to write the compiled CSS.
|
76
79
|
def self.compile_file(filename, *args)
|
77
80
|
options = args.last.is_a?(Hash) ? args.pop : {}
|
@@ -46,7 +46,7 @@ module Sass
|
|
46
46
|
#
|
47
47
|
# @param key [String] The key to store it under.
|
48
48
|
# @param sha [String] The checksum for the contents that are being stored.
|
49
|
-
# @param
|
49
|
+
# @param root [Object] The root node to cache.
|
50
50
|
def store(key, sha, root)
|
51
51
|
_store(key, Sass::VERSION, sha, Marshal.dump(root))
|
52
52
|
rescue TypeError, LoadError => e
|
data/lib/sass/css.rb
CHANGED
data/lib/sass/exec.rb
CHANGED
@@ -134,9 +134,9 @@ module Sass
|
|
134
134
|
STDOUT.flush
|
135
135
|
end
|
136
136
|
|
137
|
-
# Same as
|
137
|
+
# Same as `Kernel.puts`, but doesn't print anything if the `--quiet` option is set.
|
138
138
|
#
|
139
|
-
# @param args [Array] Passed on to
|
139
|
+
# @param args [Array] Passed on to `Kernel.puts`
|
140
140
|
def puts(*args)
|
141
141
|
return if @options[:for_engine][:quiet]
|
142
142
|
Kernel.puts(*args)
|
data/lib/sass/features.rb
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
require 'set'
|
2
|
-
|
3
|
-
# Provides `Sass.has_feature?` which allows for simple feature detection
|
4
|
-
# by providing a feature name.
|
5
2
|
module Sass
|
3
|
+
# Provides `Sass.has_feature?` which allows for simple feature detection
|
4
|
+
# by providing a feature name.
|
6
5
|
module Features
|
7
6
|
|
8
7
|
# This is the set of features that can be detected.
|
data/lib/sass/media.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
module Sass::Media
|
3
3
|
# A comma-separated list of queries.
|
4
4
|
#
|
5
|
-
#
|
5
|
+
# media_query [ ',' S* media_query ]*
|
6
6
|
class QueryList
|
7
7
|
# The queries contained in this list.
|
8
8
|
#
|
@@ -62,7 +62,7 @@ module Sass::Media
|
|
62
62
|
|
63
63
|
# A single media query.
|
64
64
|
#
|
65
|
-
#
|
65
|
+
# [ [ONLY | NOT]? S* media_type S* | expression ] [ AND S* expression ]*
|
66
66
|
class Query
|
67
67
|
# The modifier for the query.
|
68
68
|
#
|
@@ -201,7 +201,7 @@ module Sass::Media
|
|
201
201
|
|
202
202
|
# Converts an interpolation array to source.
|
203
203
|
#
|
204
|
-
# @param [Array<String, Sass::Script::Tree::Node>] The interpolation array to convert.
|
204
|
+
# @param interp [Array<String, Sass::Script::Tree::Node>] The interpolation array to convert.
|
205
205
|
# @param options [{Symbol => Object}] An options hash (see {Sass::CSS#initialize}).
|
206
206
|
# @return [String]
|
207
207
|
def self._interp_to_src(interp, options)
|
@@ -1,9 +1,8 @@
|
|
1
|
-
# We keep configuration in its own self-contained file
|
2
|
-
# so that we can load it independently in Rails 3,
|
3
|
-
# where the full plugin stuff is lazy-loaded.
|
4
|
-
|
5
1
|
module Sass
|
6
2
|
module Plugin
|
3
|
+
# We keep configuration in its own self-contained file
|
4
|
+
# so that we can load it independently in Rails 3,
|
5
|
+
# where the full plugin stuff is lazy-loaded.
|
7
6
|
module Configuration
|
8
7
|
|
9
8
|
# Returns the default options for a {Sass::Plugin::Compiler}.
|
@@ -119,7 +119,7 @@ module Sass::Script
|
|
119
119
|
# \{#str_index str-index($string, $substring)}
|
120
120
|
# : Returns the index where a substring is found in another string or 0 if not found.
|
121
121
|
#
|
122
|
-
# \{#
|
122
|
+
# \{#str_slice str-slice($string, $start, $end)}
|
123
123
|
# : Extracts a substring of characters from $string
|
124
124
|
#
|
125
125
|
# \{#to_upper_case to-upper-case($string)}
|
@@ -171,7 +171,7 @@ module Sass::Script
|
|
171
171
|
# \{#index index($list, $value)}
|
172
172
|
# : Returns the position of a value within a list, or false.
|
173
173
|
#
|
174
|
-
# \{#
|
174
|
+
# \{#list_separator list-separator(#list)}
|
175
175
|
# : Returns the separator of a list.
|
176
176
|
#
|
177
177
|
# ## Introspection Functions
|
@@ -196,7 +196,7 @@ module Sass::Script
|
|
196
196
|
# \{#if if($condition, $if-true, $if-false)}
|
197
197
|
# : Returns one of two values, depending on whether or not a condition is true.
|
198
198
|
#
|
199
|
-
# \{#
|
199
|
+
# \{#unique_id unique-id()}
|
200
200
|
# : Returns a unique CSS identifier.
|
201
201
|
#
|
202
202
|
# ## Adding Custom Functions
|
@@ -221,7 +221,7 @@ module Sass::Script
|
|
221
221
|
# Value objects are also expected to be returned.
|
222
222
|
# This means that Ruby values must be unwrapped and wrapped.
|
223
223
|
#
|
224
|
-
# Most Value objects support the {Value#value value} accessor for getting
|
224
|
+
# Most Value objects support the {Value::Base#value value} accessor for getting
|
225
225
|
# their Ruby values. Color objects, though, must be accessed using
|
226
226
|
# {Sass::Script::Value::Color#rgb rgb}, {Sass::Script::Value::Color#red red},
|
227
227
|
# {Sass::Script::Value::Color#blue green}, or {Sass::Script::Value::Color#blue
|
@@ -246,7 +246,7 @@ module Sass::Script
|
|
246
246
|
# ### Caveats
|
247
247
|
#
|
248
248
|
# When creating new {Value} objects within functions, be aware that it's not
|
249
|
-
# safe to call {Value#to_s #to_s} (or other methods that use the string
|
249
|
+
# safe to call {Value::Base#to_s #to_s} (or other methods that use the string
|
250
250
|
# representation) on those objects without first setting {Tree::Node#options=
|
251
251
|
# the #options attribute}.
|
252
252
|
module Functions
|
@@ -649,18 +649,21 @@ module Sass::Script
|
|
649
649
|
end
|
650
650
|
declare :lightness, [:color]
|
651
651
|
|
652
|
-
#
|
653
|
-
#
|
652
|
+
# @overload alpha(color)
|
653
|
+
# Returns the alpha component (opacity) of a color.
|
654
|
+
# This is 1 unless otherwise specified.
|
654
655
|
#
|
655
|
-
#
|
656
|
-
#
|
656
|
+
# @param color [Sass::Script::Value::Color]
|
657
|
+
# @return [Sass::Script::Value::Number]
|
658
|
+
# @see #opacify
|
659
|
+
# @see #transparentize
|
660
|
+
# @raise [ArgumentError] If `color` isn't a color
|
657
661
|
#
|
658
|
-
# @overload
|
659
|
-
#
|
660
|
-
#
|
661
|
-
#
|
662
|
-
#
|
663
|
-
# @raise [ArgumentError] If `color` isn't a color
|
662
|
+
# @overload alpha(microsoft_string)
|
663
|
+
# Support for the proprietary Microsoft `alpha(opacity=20)` syntax.
|
664
|
+
#
|
665
|
+
# @param microsoft_string A special literal representing the
|
666
|
+
# css-incompatible microsoft syntax
|
664
667
|
def alpha(*args)
|
665
668
|
if args.all? do |a|
|
666
669
|
a.is_a?(Sass::Script::Value::String) && a.type == :identifier &&
|
@@ -821,10 +824,10 @@ module Sass::Script
|
|
821
824
|
# adjust-hue(hsl(120, 30%, 90%), 60deg) => hsl(180, 30%, 90%)
|
822
825
|
# adjust-hue(hsl(120, 30%, 90%), 060deg) => hsl(60, 30%, 90%)
|
823
826
|
# adjust-hue(#811, 45deg) => #886a11
|
824
|
-
# @param color [Sass::Script::Value::Color]
|
825
|
-
# @param
|
826
|
-
# @return [Sass::Script::Value::Color]
|
827
|
-
# @raise [ArgumentError] If `color` isn't a color, or `
|
827
|
+
# @param color [Sass::Script::Value::Color] The color to adjust.
|
828
|
+
# @param degrees [Sass::Script::Value::Number] The number of degrees to shift the hue.
|
829
|
+
# @return [Sass::Script::Value::Color] The transformed color.
|
830
|
+
# @raise [ArgumentError] If `color` isn't a color, or `degrees` isn't a number
|
828
831
|
def adjust_hue(color, degrees)
|
829
832
|
assert_type color, :Color
|
830
833
|
assert_type degrees, :Number
|
@@ -867,13 +870,13 @@ module Sass::Script
|
|
867
870
|
# adjust-color(#102030, $red: -5, $blue: 5) => #0b2035
|
868
871
|
# adjust-color(hsl(25, 100%, 80%), $lightness: -30%, $alpha: -0.4) => hsla(25, 100%, 50%, 0.6)
|
869
872
|
# @param color [Sass::Script::Value::Color]
|
870
|
-
# @
|
871
|
-
# @
|
872
|
-
# @
|
873
|
-
# @
|
874
|
-
# @
|
875
|
-
# @
|
876
|
-
# @
|
873
|
+
# @option kwargs [Sass::Script::Value::Number] "red" The amount by which the red component should change.
|
874
|
+
# @option kwargs [Sass::Script::Value::Number] "green" The amount by which the green component should change.
|
875
|
+
# @option kwargs [Sass::Script::Value::Number] "blue" The amount by which the blue component should change.
|
876
|
+
# @option kwargs [Sass::Script::Value::Number] "hue" The number of degrees by which the hue should change.
|
877
|
+
# @option kwargs [Sass::Script::Value::Number] "saturation" The amount by which the saturation should change.
|
878
|
+
# @option kwargs [Sass::Script::Value::Number] "lightness" The amount by which the lightness should change.
|
879
|
+
# @option kwargs [Sass::Script::Value::Number] "alpha" The amount by which the alpha channel should change.
|
877
880
|
# @return [Sass::Script::Value::Color]
|
878
881
|
# @raise [ArgumentError] if `color` is not a color,
|
879
882
|
# if any keyword argument is not a number,
|
@@ -937,12 +940,12 @@ module Sass::Script
|
|
937
940
|
# scale-color(rgb(200, 150, 170), $green: -40%, $blue: 70%) => rgb(200, 90, 229)
|
938
941
|
# scale-color(hsl(200, 70, 80), $saturation: -90%, $alpha: -30%) => hsla(200, 7, 80, 0.7)
|
939
942
|
# @param color [Sass::Script::Value::Color]
|
940
|
-
# @
|
941
|
-
# @
|
942
|
-
# @
|
943
|
-
# @
|
944
|
-
# @
|
945
|
-
# @
|
943
|
+
# @option kwargs [Sass::Script::Value::Number] "red" The amount by which the red component should scale.
|
944
|
+
# @option kwargs [Sass::Script::Value::Number] "green" The amount by which the green component should scale.
|
945
|
+
# @option kwargs [Sass::Script::Value::Number] "blue" The amount by which the blue component should scale.
|
946
|
+
# @option kwargs [Sass::Script::Value::Number] "saturation" The amount by which the saturation should scale.
|
947
|
+
# @option kwargs [Sass::Script::Value::Number] "lightness" The amount by which the lightness should scale.
|
948
|
+
# @option kwargs [Sass::Script::Value::Number] "alpha" The amount by which the alpha channel should scale.
|
946
949
|
# @return [Sass::Script::Value::Color]
|
947
950
|
# @raise [ArgumentError] if `color` is not a color,
|
948
951
|
# if any keyword argument is not a percentage between 0% and 100%,
|
@@ -997,13 +1000,13 @@ module Sass::Script
|
|
997
1000
|
# change-color(#102030, $red: 120, $blue: 5) => #782005
|
998
1001
|
# change-color(hsl(25, 100%, 80%), $lightness: 40%, $alpha: 0.8) => hsla(25, 100%, 40%, 0.8)
|
999
1002
|
# @param color [Sass::Script::Value::Color]
|
1000
|
-
# @
|
1001
|
-
# @
|
1002
|
-
# @
|
1003
|
-
# @
|
1004
|
-
# @
|
1005
|
-
# @
|
1006
|
-
# @
|
1003
|
+
# @option kwargs [Sass::Script::Value::Number] "red" The amount by which the red component should change.
|
1004
|
+
# @option kwargs [Sass::Script::Value::Number] "green" The amount by which the green component should change.
|
1005
|
+
# @option kwargs [Sass::Script::Value::Number] "blue" The amount by which the blue component should change.
|
1006
|
+
# @option kwargs [Sass::Script::Value::Number] "hue" The number of degrees by which the hue should change.
|
1007
|
+
# @option kwargs [Sass::Script::Value::Number] "saturation" The amount by which the saturation should change.
|
1008
|
+
# @option kwargs [Sass::Script::Value::Number] "lightness" The amount by which the lightness should change.
|
1009
|
+
# @option kwargs [Sass::Script::Value::Number] "alpha" The amount by which the alpha channel should change.
|
1007
1010
|
# @return [Sass::Script::Value::Color]
|
1008
1011
|
# @raise [ArgumentError] if `color` is not a color,
|
1009
1012
|
# if any keyword argument is not a number,
|
@@ -1688,11 +1691,10 @@ module Sass::Script
|
|
1688
1691
|
declare :unique_id, []
|
1689
1692
|
|
1690
1693
|
# This function only exists as a workaround for IE7's [`content:counter`
|
1691
|
-
# bug]
|
1694
|
+
# bug](http://jes.st/2013/ie7s-css-breaking-content-counter-bug/).
|
1695
|
+
# It works identically to any other plain-CSS function, except it
|
1692
1696
|
# avoids adding spaces between the argument commas.
|
1693
1697
|
#
|
1694
|
-
# [bug]: http://jes.st/2013/ie7s-css-breaking-content-counter-bug/
|
1695
|
-
#
|
1696
1698
|
# @example
|
1697
1699
|
# counter(item, ".") => counter(item,".")
|
1698
1700
|
def counter(*args)
|
data/lib/sass/script/lexer.rb
CHANGED
@@ -16,7 +16,7 @@ module Sass
|
|
16
16
|
# `value`: \[`Object`\]
|
17
17
|
# : The Ruby object corresponding to the value of the token.
|
18
18
|
#
|
19
|
-
# `source_range`: [`Sass::Source::Range`\]
|
19
|
+
# `source_range`: \[`Sass::Source::Range`\]
|
20
20
|
# : The range in the source file in which the token appeared.
|
21
21
|
#
|
22
22
|
# `pos`: \[`Fixnum`\]
|
data/lib/sass/script/parser.rb
CHANGED
@@ -65,7 +65,7 @@ module Sass
|
|
65
65
|
# Parses a SassScript expression,
|
66
66
|
# ending it when it encounters one of the given identifier tokens.
|
67
67
|
#
|
68
|
-
# @param [#include?(String)] A set of strings that delimit the expression.
|
68
|
+
# @param tokens [#include?(String)] A set of strings that delimit the expression.
|
69
69
|
# @return [Script::Tree::Node] The root node of the parse tree
|
70
70
|
# @raise [Sass::SyntaxError] if the expression isn't valid SassScript
|
71
71
|
def parse_until(tokens)
|
@@ -161,7 +161,7 @@ module Sass::Script::Tree
|
|
161
161
|
raise Sass::SyntaxError.new("#{message} for `#{name}'")
|
162
162
|
end
|
163
163
|
|
164
|
-
# Compass historically overrode this before it changed name to {#
|
164
|
+
# Compass historically overrode this before it changed name to {Funcall#to_value}.
|
165
165
|
# We should get rid of it in the future.
|
166
166
|
def to_literal(args)
|
167
167
|
to_value(args)
|
@@ -25,12 +25,12 @@ module Sass::Script::Tree
|
|
25
25
|
|
26
26
|
# Interpolation in a property is of the form `before #{mid} after`.
|
27
27
|
#
|
28
|
-
# @param before [Node] See {#before}
|
29
|
-
# @param mid [Node] See {#mid}
|
30
|
-
# @param after [Node] See {#after}
|
31
|
-
# @param wb [Boolean] See {#
|
32
|
-
# @param wa [Boolean] See {#
|
33
|
-
# @param originally_text [Boolean] See {#
|
28
|
+
# @param before [Node] See {Interpolation#before}
|
29
|
+
# @param mid [Node] See {Interpolation#mid}
|
30
|
+
# @param after [Node] See {Interpolation#after}
|
31
|
+
# @param wb [Boolean] See {Interpolation#whitespace_before}
|
32
|
+
# @param wa [Boolean] See {Interpolation#whitespace_after}
|
33
|
+
# @param originally_text [Boolean] See {Interpolation#originally_text}
|
34
34
|
def initialize(before, mid, after, wb, wa, originally_text = false)
|
35
35
|
@before = before
|
36
36
|
@mid = mid
|
@@ -407,7 +407,7 @@ module Sass::Script::Value
|
|
407
407
|
# : Adds each of the RGB color channels together.
|
408
408
|
#
|
409
409
|
# {Value}
|
410
|
-
# : See {Value#plus}.
|
410
|
+
# : See {Value::Base#plus}.
|
411
411
|
#
|
412
412
|
# @param other [Value] The right-hand side of the operator
|
413
413
|
# @return [Color] The resulting color
|
@@ -430,7 +430,7 @@ module Sass::Script::Value
|
|
430
430
|
# : Subtracts each of the other color's RGB color channels from this color's.
|
431
431
|
#
|
432
432
|
# {Value}
|
433
|
-
# : See {Value#minus}.
|
433
|
+
# : See {Value::Base#minus}.
|
434
434
|
#
|
435
435
|
# @param other [Value] The right-hand side of the operator
|
436
436
|
# @return [Color] The resulting color
|
@@ -473,7 +473,7 @@ module Sass::Script::Value
|
|
473
473
|
# : Divides each of this color's RGB color channels by the other color's.
|
474
474
|
#
|
475
475
|
# {Value}
|
476
|
-
# : See {Value#div}.
|
476
|
+
# : See {Value::Base#div}.
|
477
477
|
#
|
478
478
|
# @param other [Value] The right-hand side of the operator
|
479
479
|
# @return [Color] The resulting color
|
@@ -76,7 +76,7 @@ module Sass::Script::Value
|
|
76
76
|
# : Adds this number to each of the RGB color channels.
|
77
77
|
#
|
78
78
|
# {Value}
|
79
|
-
# : See {Value#plus}.
|
79
|
+
# : See {Value::Base#plus}.
|
80
80
|
#
|
81
81
|
# @param other [Value] The right-hand side of the operator
|
82
82
|
# @return [Value] The result of the operation
|
@@ -98,7 +98,7 @@ module Sass::Script::Value
|
|
98
98
|
# : Subtracts this number from the other, converting units if possible.
|
99
99
|
#
|
100
100
|
# {Value}
|
101
|
-
# : See {Value#minus}.
|
101
|
+
# : See {Value::Base#minus}.
|
102
102
|
#
|
103
103
|
# @param other [Value] The right-hand side of the operator
|
104
104
|
# @return [Value] The result of the operation
|
@@ -154,7 +154,7 @@ module Sass::Script::Value
|
|
154
154
|
# : Divides this number by the other, converting units appropriately.
|
155
155
|
#
|
156
156
|
# {Value}
|
157
|
-
# : See {Value#div}.
|
157
|
+
# : See {Value::Base#div}.
|
158
158
|
#
|
159
159
|
# @param other [Value] The right-hand side of the operator
|
160
160
|
# @return [Value] The result of the operation
|
@@ -291,7 +291,6 @@ module Sass::Script::Value
|
|
291
291
|
# number.is_unit?("px") => true
|
292
292
|
# number.is_unit?(nil) => false
|
293
293
|
#
|
294
|
-
# @param number [Number] The number to check
|
295
294
|
# @param unit [::String, nil] The unit the number should have or nil if the number should be unitless.
|
296
295
|
# @see Number#unitless? The unitless? method may be more readable.
|
297
296
|
def is_unit?(unit)
|
data/lib/sass/selector.rb
CHANGED
@@ -21,8 +21,6 @@ module Sass
|
|
21
21
|
# The base used for calculating selector specificity. The spec says this
|
22
22
|
# should be "sufficiently high"; it's extremely unlikely that any single
|
23
23
|
# selector sequence will contain 1,000 simple selectors.
|
24
|
-
#
|
25
|
-
# @type [Fixnum]
|
26
24
|
SPECIFICITY_BASE = 1_000
|
27
25
|
|
28
26
|
# A parent-referencing selector (`&` in Sass).
|
@@ -318,7 +316,7 @@ module Sass
|
|
318
316
|
# @param namespace [Array<String, Sass::Script::Tree::Node>, nil] See \{#namespace}
|
319
317
|
# @param operator [String] The matching operator, e.g. `"="` or `"^="`
|
320
318
|
# @param value [Array<String, Sass::Script::Tree::Node>] See \{#value}
|
321
|
-
# @param
|
319
|
+
# @param flags [Array<String, Sass::Script::Tree::Node>] See \{#flags}
|
322
320
|
def initialize(name, namespace, operator, value, flags)
|
323
321
|
@name = name
|
324
322
|
@namespace = namespace
|
@@ -428,8 +426,8 @@ module Sass
|
|
428
426
|
# @return [Selector::Sequence]
|
429
427
|
attr_reader :selector
|
430
428
|
|
431
|
-
# @param [String] The name of the pseudoclass
|
432
|
-
# @param [Selector::CommaSequence] The selector argument
|
429
|
+
# @param name [String] The name of the pseudoclass
|
430
|
+
# @param selector [Selector::CommaSequence] The selector argument
|
433
431
|
def initialize(name, selector)
|
434
432
|
@name = name
|
435
433
|
@selector = selector
|
@@ -21,7 +21,7 @@ module Sass
|
|
21
21
|
# and the generated selector `c.foo.bar.baz` has `{b.bar, c.baz}` as its
|
22
22
|
# `sources` set.
|
23
23
|
#
|
24
|
-
# This is populated during the {#do_extend} process.
|
24
|
+
# This is populated during the {Sequence#do_extend} process.
|
25
25
|
#
|
26
26
|
# @return {Set<Sequence>}
|
27
27
|
attr_accessor :sources
|
@@ -125,7 +125,7 @@ module Sass
|
|
125
125
|
# that matches both this selector and the input selector.
|
126
126
|
#
|
127
127
|
# @param sels [Array<Simple>] A {SimpleSequence}'s {SimpleSequence#members members array}
|
128
|
-
# @param
|
128
|
+
# @param other_subject [Boolean] Whether the other {SimpleSequence} being merged is a subject.
|
129
129
|
# @return [SimpleSequence, nil] A {SimpleSequence} matching both `sels` and this selector,
|
130
130
|
# or `nil` if this is impossible (e.g. unifying `#foo` and `#bar`)
|
131
131
|
# @raise [Sass::SyntaxError] If this selector cannot be unified.
|
@@ -170,7 +170,7 @@ module Sass
|
|
170
170
|
end
|
171
171
|
|
172
172
|
# Return a copy of this simple sequence with `sources` merged into the
|
173
|
-
# {#sources} set.
|
173
|
+
# {SimpleSequence#sources} set.
|
174
174
|
#
|
175
175
|
# @param sources [Set<Sequence>]
|
176
176
|
# @return [SimpleSequence]
|
data/lib/sass/source/map.rb
CHANGED
@@ -71,7 +71,7 @@ module Sass::Source
|
|
71
71
|
# assumption that the local file system has the same layout as the server.
|
72
72
|
#
|
73
73
|
# If any source stylesheets use the default filesystem importer, sourcemap
|
74
|
-
# generation will fail unless the
|
74
|
+
# generation will fail unless the `:sourcemap_path` option is specified.
|
75
75
|
# The layout of the local file system is assumed to be the same as the
|
76
76
|
# layout of the server for the purposes of linking to source stylesheets
|
77
77
|
# that use the filesystem importer.
|
data/lib/sass/supports.rb
CHANGED
@@ -4,7 +4,7 @@ module Sass::Supports
|
|
4
4
|
class Condition
|
5
5
|
# Runs the SassScript in the supports condition.
|
6
6
|
#
|
7
|
-
# @param
|
7
|
+
# @param environment [Sass::Environment] The environment in which to run the script.
|
8
8
|
def perform(environment); Sass::Util.abstract(self); end
|
9
9
|
|
10
10
|
# Returns the CSS for this condition.
|
@@ -133,20 +133,19 @@ module Sass::Supports
|
|
133
133
|
|
134
134
|
# A declaration condition (e.g. `(feature: value)`).
|
135
135
|
class Declaration < Condition
|
136
|
-
# The feature name.
|
137
|
-
#
|
138
|
-
# @param [Sass::Script::Tree::Node]
|
136
|
+
# @return [Sass::Script::Tree::Node] The feature name.
|
139
137
|
attr_accessor :name
|
140
138
|
|
141
|
-
#
|
142
|
-
#
|
139
|
+
# @!attribute resolved_name
|
140
|
+
# The name of the feature after any SassScript has been resolved.
|
141
|
+
# Only set once \{Tree::Visitors::Perform} has been run.
|
143
142
|
#
|
144
|
-
#
|
143
|
+
# @return [String]
|
145
144
|
attr_accessor :resolved_name
|
146
145
|
|
147
146
|
# The feature value.
|
148
147
|
#
|
149
|
-
# @
|
148
|
+
# @return [Sass::Script::Tree::Node]
|
150
149
|
attr_accessor :value
|
151
150
|
|
152
151
|
# The value of the feature after any SassScript has been resolved.
|
@@ -190,7 +189,7 @@ module Sass::Supports
|
|
190
189
|
class Interpolation < Condition
|
191
190
|
# The SassScript expression in the interpolation.
|
192
191
|
#
|
193
|
-
# @
|
192
|
+
# @return [Sass::Script::Tree::Node]
|
194
193
|
attr_accessor :value
|
195
194
|
|
196
195
|
# The value of the expression after it's been resolved.
|
@@ -10,7 +10,7 @@ module Sass::Tree
|
|
10
10
|
attr_accessor :uri
|
11
11
|
|
12
12
|
# The text of the URI being imported after any interpolated SassScript has
|
13
|
-
# been resolved. Only set once
|
13
|
+
# been resolved. Only set once {Tree::Visitors::Perform} has been run.
|
14
14
|
#
|
15
15
|
# @return [String]
|
16
16
|
attr_accessor :resolved_uri
|
@@ -22,8 +22,8 @@ module Sass::Tree
|
|
22
22
|
# @return [Array<String, Sass::Script::Tree::Node>]
|
23
23
|
attr_accessor :query
|
24
24
|
|
25
|
-
# The media query for this rule, without any unresolved interpolation.
|
26
|
-
# only set once {Tree::
|
25
|
+
# The media query for this rule, without any unresolved interpolation.
|
26
|
+
# It's only set once {Tree::Visitors::Perform} has been run.
|
27
27
|
#
|
28
28
|
# @return [Sass::Media::QueryList]
|
29
29
|
attr_accessor :resolved_query
|
data/lib/sass/tree/each_node.rb
CHANGED
@@ -31,7 +31,7 @@ module Sass::Tree
|
|
31
31
|
# The CSS selector to extend,
|
32
32
|
# interspersed with {Sass::Script::Tree::Node}s
|
33
33
|
# representing `#{}`-interpolation.
|
34
|
-
# @param optional [Boolean] See \{#optional}
|
34
|
+
# @param optional [Boolean] See \{ExtendNode#optional?}
|
35
35
|
# @param selector_source_range [Sass::Source::Range] The extended selector source range.
|
36
36
|
def initialize(selector, optional, selector_source_range)
|
37
37
|
@selector = selector
|
data/lib/sass/tree/media_node.rb
CHANGED
@@ -16,7 +16,7 @@ module Sass::Tree
|
|
16
16
|
attr_accessor :query
|
17
17
|
|
18
18
|
# The media query for this rule, without any unresolved interpolation. It's
|
19
|
-
# only set once {Tree::
|
19
|
+
# only set once {Tree::Visitors::Perform} has been run.
|
20
20
|
#
|
21
21
|
# @return [Sass::Media::QueryList]
|
22
22
|
attr_accessor :resolved_query
|
data/lib/sass/tree/rule_node.rb
CHANGED
@@ -19,7 +19,8 @@ module Sass::Tree
|
|
19
19
|
# The CSS selector for this rule,
|
20
20
|
# without any unresolved interpolation
|
21
21
|
# but with parent references still intact.
|
22
|
-
# It's only set once {Tree::
|
22
|
+
# It's only set once {Tree::Visitors::Perform} has been run.
|
23
|
+
#
|
23
24
|
#
|
24
25
|
# @return [Selector::CommaSequence]
|
25
26
|
attr_accessor :parsed_rules
|
data/lib/sass/tree/trace_node.rb
CHANGED
@@ -7,6 +7,7 @@ module Sass::Tree
|
|
7
7
|
# @see Sass::Tree
|
8
8
|
class TraceNode < Node
|
9
9
|
# The name of the trace entry to add.
|
10
|
+
#
|
10
11
|
# @return [String]
|
11
12
|
attr_reader :name
|
12
13
|
|
@@ -19,7 +20,7 @@ module Sass::Tree
|
|
19
20
|
|
20
21
|
# Initializes this node from an existing node.
|
21
22
|
# @param name [String] The name of the trace entry to add.
|
22
|
-
# @param
|
23
|
+
# @param node [Node] The node to copy information from.
|
23
24
|
# @return [TraceNode]
|
24
25
|
def self.from_node(name, node)
|
25
26
|
trace = new(name)
|
@@ -94,7 +94,7 @@ class Sass::Tree::Visitors::Cssize < Sass::Tree::Visitors::Base
|
|
94
94
|
end
|
95
95
|
|
96
96
|
# A simple struct wrapping up information about a single `@extend` instance. A
|
97
|
-
# single
|
97
|
+
# single {ExtendNode} can have multiple Extends if either the parent node or
|
98
98
|
# the extended selector is a comma sequence.
|
99
99
|
#
|
100
100
|
# @attr extender [Sass::Selector::Sequence]
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# A visitor for converting a Sass tree into CSS.
|
2
2
|
class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
3
3
|
# The source mapping for the generated CSS file. This is only set if
|
4
|
-
# `build_source_mapping` is passed to the constructor and \{#render} has been
|
4
|
+
# `build_source_mapping` is passed to the constructor and \{Sass::Engine#render} has been
|
5
5
|
# run.
|
6
6
|
attr_reader :source_mapping
|
7
7
|
|
data/lib/sass/util.rb
CHANGED
@@ -235,7 +235,7 @@ module Sass
|
|
235
235
|
end
|
236
236
|
|
237
237
|
# Performs the equivalent of `enum.group_by.to_a`, but with a guaranteed
|
238
|
-
# order. Unlike
|
238
|
+
# order. Unlike {Util#hash_to_a}, the resulting order isn't sorted key order;
|
239
239
|
# instead, it's the same order as `#group_by` has under Ruby 1.9 (key
|
240
240
|
# appearance order).
|
241
241
|
#
|
@@ -259,7 +259,7 @@ module Sass
|
|
259
259
|
|
260
260
|
# Returns a sub-array of `minuend` containing only elements that are also in
|
261
261
|
# `subtrahend`. Ensures that the return value has the same order as
|
262
|
-
# `minuend`, even on Rubinius where that's not guaranteed by
|
262
|
+
# `minuend`, even on Rubinius where that's not guaranteed by `Array#-`.
|
263
263
|
#
|
264
264
|
# @param minuend [Array]
|
265
265
|
# @param subtrahend [Array]
|
@@ -273,7 +273,7 @@ module Sass
|
|
273
273
|
# Returns a string description of the character that caused an
|
274
274
|
# `Encoding::UndefinedConversionError`.
|
275
275
|
#
|
276
|
-
# @param [Encoding::UndefinedConversionError]
|
276
|
+
# @param e [Encoding::UndefinedConversionError]
|
277
277
|
# @return [String]
|
278
278
|
def undefined_conversion_error_char(e)
|
279
279
|
# Rubinius (as of 2.0.0.rc1) pre-quotes the error character.
|
data/lib/sass/version.rb
CHANGED
@@ -14,7 +14,7 @@ module Sass
|
|
14
14
|
# The `:name` key has the name of the version.
|
15
15
|
# The `:string` key contains a human-readable string representation of the version.
|
16
16
|
# The `:number` key is the major, minor, and teeny keys separated by periods.
|
17
|
-
# The `:date` key, which is not guaranteed to be defined, is the
|
17
|
+
# The `:date` key, which is not guaranteed to be defined, is the `DateTime` at which this release was cut.
|
18
18
|
# If Sass is checked out from Git, the `:rev` key will have the revision hash.
|
19
19
|
# For example:
|
20
20
|
#
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 592302725
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 3
|
9
9
|
- 0
|
10
10
|
- alpha
|
11
|
-
-
|
12
|
-
version: 3.3.0.alpha.
|
11
|
+
- 196
|
12
|
+
version: 3.3.0.alpha.196
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Nathan Weizenbaum
|
@@ -19,7 +19,7 @@ autorequire:
|
|
19
19
|
bindir: bin
|
20
20
|
cert_chain: []
|
21
21
|
|
22
|
-
date: 2013-
|
22
|
+
date: 2013-07-02 00:00:00 -04:00
|
23
23
|
default_executable:
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|
@@ -94,13 +94,14 @@ files:
|
|
94
94
|
- lib/sass/environment.rb
|
95
95
|
- lib/sass/error.rb
|
96
96
|
- lib/sass/exec.rb
|
97
|
+
- lib/sass/media.rb
|
97
98
|
- lib/sass/importers.rb
|
98
99
|
- lib/sass/importers/base.rb
|
99
100
|
- lib/sass/importers/filesystem.rb
|
100
101
|
- lib/sass/logger.rb
|
101
102
|
- lib/sass/logger/base.rb
|
102
103
|
- lib/sass/logger/log_level.rb
|
103
|
-
- lib/sass/
|
104
|
+
- lib/sass/util.rb
|
104
105
|
- lib/sass/plugin.rb
|
105
106
|
- lib/sass/plugin/compiler.rb
|
106
107
|
- lib/sass/plugin/configuration.rb
|
@@ -152,7 +153,9 @@ files:
|
|
152
153
|
- lib/sass/selector/simple_sequence.rb
|
153
154
|
- lib/sass/shared.rb
|
154
155
|
- lib/sass/supports.rb
|
155
|
-
- lib/sass/
|
156
|
+
- lib/sass/source/map.rb
|
157
|
+
- lib/sass/source/position.rb
|
158
|
+
- lib/sass/source/range.rb
|
156
159
|
- lib/sass/tree/charset_node.rb
|
157
160
|
- lib/sass/tree/comment_node.rb
|
158
161
|
- lib/sass/tree/content_node.rb
|
@@ -187,9 +190,6 @@ files:
|
|
187
190
|
- lib/sass/tree/visitors/to_css.rb
|
188
191
|
- lib/sass/tree/warn_node.rb
|
189
192
|
- lib/sass/tree/while_node.rb
|
190
|
-
- lib/sass/source/map.rb
|
191
|
-
- lib/sass/source/position.rb
|
192
|
-
- lib/sass/source/range.rb
|
193
193
|
- lib/sass/util/multibyte_string_scanner.rb
|
194
194
|
- lib/sass/util/subset_map.rb
|
195
195
|
- lib/sass/version.rb
|