sass 3.4.22 → 3.4.24
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.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/CONTRIBUTING.md +23 -0
- data/README.md +8 -8
- data/Rakefile +2 -10
- data/VERSION +1 -1
- data/VERSION_DATE +1 -1
- data/extra/sass-spec-ref.sh +32 -0
- data/lib/sass/cache_stores/filesystem.rb +1 -1
- data/lib/sass/engine.rb +3 -3
- data/lib/sass/error.rb +3 -3
- data/lib/sass/exec/base.rb +1 -1
- data/lib/sass/logger/base.rb +8 -2
- data/lib/sass/logger/delayed.rb +50 -0
- data/lib/sass/logger.rb +8 -3
- data/lib/sass/plugin/rack.rb +1 -1
- data/lib/sass/plugin/staleness_checker.rb +2 -2
- data/lib/sass/script/functions.rb +10 -7
- data/lib/sass/script/lexer.rb +5 -5
- data/lib/sass/script/parser.rb +17 -11
- data/lib/sass/script/tree/node.rb +1 -1
- data/lib/sass/script/value/base.rb +2 -2
- data/lib/sass/script/value/color.rb +10 -10
- data/lib/sass/script/value/number.rb +11 -9
- data/lib/sass/script.rb +2 -2
- data/lib/sass/scss/parser.rb +26 -8
- data/lib/sass/scss/rx.rb +1 -1
- data/lib/sass/selector/abstract_sequence.rb +5 -5
- data/lib/sass/selector/sequence.rb +2 -2
- data/lib/sass/selector/simple.rb +4 -4
- data/lib/sass/shared.rb +1 -1
- data/lib/sass/source/map.rb +5 -3
- data/lib/sass/source/position.rb +4 -4
- data/lib/sass/tree/comment_node.rb +1 -1
- data/lib/sass/tree/node.rb +1 -1
- data/lib/sass/tree/prop_node.rb +1 -1
- data/lib/sass/tree/rule_node.rb +1 -1
- data/lib/sass/tree/visitors/convert.rb +3 -1
- data/lib/sass/tree/visitors/to_css.rb +1 -1
- data/lib/sass/util.rb +33 -8
- data/lib/sass/version.rb +2 -2
- data/test/sass/conversion_test.rb +17 -0
- data/test/sass/extend_test.rb +38 -18
- data/test/sass/script_test.rb +3 -3
- data/test/sass/scss/scss_test.rb +33 -0
- metadata +28 -26
@@ -34,29 +34,31 @@ module Sass::Script::Value
|
|
34
34
|
attr_accessor :original
|
35
35
|
|
36
36
|
def self.precision
|
37
|
-
|
37
|
+
Thread.current[:sass_numeric_precision] || Thread.main[:sass_numeric_precision] || 5
|
38
38
|
end
|
39
39
|
|
40
40
|
# Sets the number of digits of precision
|
41
41
|
# For example, if this is `3`,
|
42
42
|
# `3.1415926` will be printed as `3.142`.
|
43
|
+
# The numeric precision is stored as a thread local for thread safety reasons.
|
44
|
+
# To set for all threads, be sure to set the precision on the main thread.
|
43
45
|
def self.precision=(digits)
|
44
|
-
|
45
|
-
|
46
|
-
|
46
|
+
Thread.current[:sass_numeric_precision] = digits.round
|
47
|
+
Thread.current[:sass_numeric_precision_factor] = nil
|
48
|
+
Thread.current[:sass_numeric_epsilon] = nil
|
47
49
|
end
|
48
50
|
|
49
51
|
# the precision factor used in numeric output
|
50
52
|
# it is derived from the `precision` method.
|
51
53
|
def self.precision_factor
|
52
|
-
|
54
|
+
Thread.current[:sass_numeric_precision_factor] ||= 10.0**precision
|
53
55
|
end
|
54
56
|
|
55
57
|
# Used in checking equality of floating point numbers. Any
|
56
58
|
# numbers within an `epsilon` of each other are considered functionally equal.
|
57
59
|
# The value for epsilon is one tenth of the current numeric precision.
|
58
60
|
def self.epsilon
|
59
|
-
|
61
|
+
Thread.current[:sass_numeric_epsilon] ||= 1 / (precision_factor * 10)
|
60
62
|
end
|
61
63
|
|
62
64
|
# Used so we don't allocate two new arrays for each new number.
|
@@ -304,7 +306,7 @@ module Sass::Script::Value
|
|
304
306
|
end
|
305
307
|
alias_method :to_sass, :inspect
|
306
308
|
|
307
|
-
# @return [
|
309
|
+
# @return [Integer] The integer value of the number
|
308
310
|
# @raise [Sass::SyntaxError] if the number isn't an integer
|
309
311
|
def to_i
|
310
312
|
super unless int?
|
@@ -508,8 +510,8 @@ module Sass::Script::Value
|
|
508
510
|
},
|
509
511
|
{
|
510
512
|
'dpi' => Rational(1),
|
511
|
-
'dpcm' => Rational(
|
512
|
-
'dppx' => Rational(
|
513
|
+
'dpcm' => Rational(254, 100),
|
514
|
+
'dppx' => Rational(96)
|
513
515
|
}
|
514
516
|
]
|
515
517
|
|
data/lib/sass/script.rb
CHANGED
@@ -16,9 +16,9 @@ module Sass
|
|
16
16
|
# Parses a string of SassScript
|
17
17
|
#
|
18
18
|
# @param value [String] The SassScript
|
19
|
-
# @param line [
|
19
|
+
# @param line [Integer] The number of the line on which the SassScript appeared.
|
20
20
|
# Used for error reporting
|
21
|
-
# @param offset [
|
21
|
+
# @param offset [Integer] The number of characters in on `line` that the SassScript started.
|
22
22
|
# Used for error reporting
|
23
23
|
# @param options [{Symbol => Object}] An options hash;
|
24
24
|
# see {file:SASS_REFERENCE.md#sass_options the Sass options documentation}
|
data/lib/sass/scss/parser.rb
CHANGED
@@ -16,9 +16,9 @@ module Sass
|
|
16
16
|
# warnings and source maps.
|
17
17
|
# @param importer [Sass::Importers::Base] The importer used to import the
|
18
18
|
# file being parsed. Used for source maps.
|
19
|
-
# @param line [
|
19
|
+
# @param line [Integer] The 1-based line on which the source string appeared,
|
20
20
|
# if it's part of another document.
|
21
|
-
# @param offset [
|
21
|
+
# @param offset [Integer] The 1-based character (not byte) offset in the line on
|
22
22
|
# which the source string starts. Used for error reporting and sourcemap
|
23
23
|
# building.
|
24
24
|
def initialize(str, filename, importer, line = 1, offset = 1)
|
@@ -560,7 +560,7 @@ module Sass
|
|
560
560
|
def supports_clause
|
561
561
|
return unless tok(/supports\(/i)
|
562
562
|
ss
|
563
|
-
supports =
|
563
|
+
supports = import_supports_condition
|
564
564
|
ss
|
565
565
|
tok!(/\)/)
|
566
566
|
supports
|
@@ -570,6 +570,10 @@ module Sass
|
|
570
570
|
supports_negation || supports_operator || supports_interpolation
|
571
571
|
end
|
572
572
|
|
573
|
+
def import_supports_condition
|
574
|
+
supports_condition || supports_declaration
|
575
|
+
end
|
576
|
+
|
573
577
|
def supports_negation
|
574
578
|
return unless tok(/not/i)
|
575
579
|
ss
|
@@ -589,6 +593,13 @@ module Sass
|
|
589
593
|
cond
|
590
594
|
end
|
591
595
|
|
596
|
+
def supports_declaration
|
597
|
+
name = sass_script(:parse)
|
598
|
+
tok!(/:/); ss
|
599
|
+
value = sass_script(:parse)
|
600
|
+
Sass::Supports::Declaration.new(name, value)
|
601
|
+
end
|
602
|
+
|
592
603
|
def supports_condition_in_parens
|
593
604
|
interp = supports_interpolation
|
594
605
|
return interp if interp
|
@@ -597,11 +608,9 @@ module Sass
|
|
597
608
|
tok!(/\)/); ss
|
598
609
|
cond
|
599
610
|
else
|
600
|
-
|
601
|
-
tok!(/:/); ss
|
602
|
-
value = sass_script(:parse)
|
611
|
+
decl = supports_declaration
|
603
612
|
tok!(/\)/); ss
|
604
|
-
|
613
|
+
decl
|
605
614
|
end
|
606
615
|
end
|
607
616
|
|
@@ -828,6 +837,9 @@ module Sass
|
|
828
837
|
|
|
829
838
|
(?!url\()
|
830
839
|
[^"'/\#!;\{\}] # "
|
840
|
+
|
|
841
|
+
# interp_uri will handle most url() calls, but not ones that take strings
|
842
|
+
url\(#{W}(?=")
|
831
843
|
|
|
832
844
|
/(?![/*])
|
833
845
|
|
|
@@ -1010,7 +1022,7 @@ WARNING
|
|
1010
1022
|
end
|
1011
1023
|
|
1012
1024
|
def str
|
1013
|
-
@strs.push ""
|
1025
|
+
@strs.push String.new("")
|
1014
1026
|
yield
|
1015
1027
|
@strs.last
|
1016
1028
|
ensure
|
@@ -1143,14 +1155,20 @@ WARNING
|
|
1143
1155
|
line = @line
|
1144
1156
|
offset = @offset
|
1145
1157
|
expected = @expected
|
1158
|
+
|
1159
|
+
logger = Sass::Logger::Delayed.install!
|
1146
1160
|
if catch(:_sass_parser_error) {yield; false}
|
1147
1161
|
@scanner.pos = pos
|
1148
1162
|
@line = line
|
1149
1163
|
@offset = offset
|
1150
1164
|
@expected = expected
|
1151
1165
|
{:pos => pos, :line => line, :expected => @expected, :block => block}
|
1166
|
+
else
|
1167
|
+
logger.flush
|
1168
|
+
nil
|
1152
1169
|
end
|
1153
1170
|
ensure
|
1171
|
+
logger.uninstall! if logger
|
1154
1172
|
@throw_error = old_throw_error
|
1155
1173
|
end
|
1156
1174
|
|
data/lib/sass/scss/rx.rb
CHANGED
@@ -40,7 +40,7 @@ module Sass
|
|
40
40
|
# escaping all significant characters.
|
41
41
|
#
|
42
42
|
# @param str [String] The text of the regexp
|
43
|
-
# @param flags [
|
43
|
+
# @param flags [Integer] Flags for the created regular expression
|
44
44
|
# @return [Regexp]
|
45
45
|
# @private
|
46
46
|
def self.quote(str, flags = 0)
|
@@ -8,7 +8,7 @@ module Sass
|
|
8
8
|
class AbstractSequence
|
9
9
|
# The line of the Sass template on which this selector was declared.
|
10
10
|
#
|
11
|
-
# @return [
|
11
|
+
# @return [Integer]
|
12
12
|
attr_reader :line
|
13
13
|
|
14
14
|
# The name of the file in which this selector was declared.
|
@@ -19,8 +19,8 @@ module Sass
|
|
19
19
|
# Sets the line of the Sass template on which this selector was declared.
|
20
20
|
# This also sets the line for all child selectors.
|
21
21
|
#
|
22
|
-
# @param line [
|
23
|
-
# @return [
|
22
|
+
# @param line [Integer]
|
23
|
+
# @return [Integer]
|
24
24
|
def line=(line)
|
25
25
|
members.each {|m| m.line = line}
|
26
26
|
@line = line
|
@@ -42,7 +42,7 @@ module Sass
|
|
42
42
|
# Subclasses should define `#_hash` rather than overriding this method,
|
43
43
|
# which automatically handles memoizing the result.
|
44
44
|
#
|
45
|
-
# @return [
|
45
|
+
# @return [Integer]
|
46
46
|
def hash
|
47
47
|
@_hash ||= _hash
|
48
48
|
end
|
@@ -83,7 +83,7 @@ module Sass
|
|
83
83
|
# The base is given by {Sass::Selector::SPECIFICITY_BASE}. This can be a
|
84
84
|
# number or a range representing possible specificities.
|
85
85
|
#
|
86
|
-
# @return [
|
86
|
+
# @return [Integer, Range]
|
87
87
|
def specificity
|
88
88
|
_specificity(members)
|
89
89
|
end
|
@@ -6,8 +6,8 @@ module Sass
|
|
6
6
|
# Sets the line of the Sass template on which this selector was declared.
|
7
7
|
# This also sets the line for all child selectors.
|
8
8
|
#
|
9
|
-
# @param line [
|
10
|
-
# @return [
|
9
|
+
# @param line [Integer]
|
10
|
+
# @return [Integer]
|
11
11
|
def line=(line)
|
12
12
|
members.each {|m| m.line = line if m.is_a?(SimpleSequence)}
|
13
13
|
@line = line
|
data/lib/sass/selector/simple.rb
CHANGED
@@ -5,7 +5,7 @@ module Sass
|
|
5
5
|
class Simple
|
6
6
|
# The line of the Sass template on which this selector was declared.
|
7
7
|
#
|
8
|
-
# @return [
|
8
|
+
# @return [Integer]
|
9
9
|
attr_accessor :line
|
10
10
|
|
11
11
|
# The name of the file in which this selector was declared,
|
@@ -36,7 +36,7 @@ module Sass
|
|
36
36
|
# so if that contains information irrelevant to the identity of the selector,
|
37
37
|
# this should be overridden.
|
38
38
|
#
|
39
|
-
# @return [
|
39
|
+
# @return [Integer]
|
40
40
|
def hash
|
41
41
|
@_hash ||= equality_key.hash
|
42
42
|
end
|
@@ -106,10 +106,10 @@ module Sass
|
|
106
106
|
# could be found at all.
|
107
107
|
# If the second value is `false`, the first should be ignored.
|
108
108
|
def unify_namespaces(ns1, ns2)
|
109
|
-
return nil, false unless ns1 == ns2 || ns1.nil? || ns1 == '*' || ns2.nil? || ns2 == '*'
|
110
109
|
return ns2, true if ns1 == '*'
|
111
110
|
return ns1, true if ns2 == '*'
|
112
|
-
|
111
|
+
return nil, false unless ns1 == ns2
|
112
|
+
[ns1, true]
|
113
113
|
end
|
114
114
|
end
|
115
115
|
end
|
data/lib/sass/shared.rb
CHANGED
@@ -31,7 +31,7 @@ module Sass
|
|
31
31
|
# A `Fixnum` in 1.8, a `String` in 1.9
|
32
32
|
# @param finish [Character] The character closing the balanced pair.
|
33
33
|
# A `Fixnum` in 1.8, a `String` in 1.9
|
34
|
-
# @param count [
|
34
|
+
# @param count [Integer] The number of opening characters matched
|
35
35
|
# before calling this method
|
36
36
|
# @return [(String, String)] The string matched within the balanced pair
|
37
37
|
# and the rest of the string.
|
data/lib/sass/source/map.rb
CHANGED
@@ -37,7 +37,7 @@ module Sass::Source
|
|
37
37
|
|
38
38
|
# Shifts all output source ranges forward one or more lines.
|
39
39
|
#
|
40
|
-
# @param delta [
|
40
|
+
# @param delta [Integer] The number of lines to shift the ranges forward.
|
41
41
|
def shift_output_lines(delta)
|
42
42
|
return if delta == 0
|
43
43
|
@data.each do |m|
|
@@ -49,7 +49,7 @@ module Sass::Source
|
|
49
49
|
# Shifts any output source ranges that lie on the first line forward one or
|
50
50
|
# more characters on that line.
|
51
51
|
#
|
52
|
-
# @param delta [
|
52
|
+
# @param delta [Integer] The number of characters to shift the ranges
|
53
53
|
# forward.
|
54
54
|
def shift_output_offsets(delta)
|
55
55
|
return if delta == 0
|
@@ -118,12 +118,14 @@ module Sass::Source
|
|
118
118
|
@data.each do |m|
|
119
119
|
file, importer = m.input.file, m.input.importer
|
120
120
|
|
121
|
+
next unless importer
|
122
|
+
|
121
123
|
if options[:type] == :inline
|
122
124
|
source_uri = file
|
123
125
|
else
|
124
126
|
sourcemap_dir = sourcemap_path && sourcemap_path.dirname.to_s
|
125
127
|
sourcemap_dir = nil if options[:type] == :file
|
126
|
-
source_uri = importer
|
128
|
+
source_uri = importer.public_url(file, sourcemap_dir)
|
127
129
|
next unless source_uri
|
128
130
|
end
|
129
131
|
|
data/lib/sass/source/position.rb
CHANGED
@@ -2,17 +2,17 @@ module Sass::Source
|
|
2
2
|
class Position
|
3
3
|
# The one-based line of the document associated with the position.
|
4
4
|
#
|
5
|
-
# @return [
|
5
|
+
# @return [Integer]
|
6
6
|
attr_accessor :line
|
7
7
|
|
8
8
|
# The one-based offset in the line of the document associated with the
|
9
9
|
# position.
|
10
10
|
#
|
11
|
-
# @return [
|
11
|
+
# @return [Integer]
|
12
12
|
attr_accessor :offset
|
13
13
|
|
14
|
-
# @param line [
|
15
|
-
# @param offset [
|
14
|
+
# @param line [Integer] The source line
|
15
|
+
# @param offset [Integer] The source offset
|
16
16
|
def initialize(line, offset)
|
17
17
|
@line = line
|
18
18
|
@offset = offset
|
data/lib/sass/tree/node.rb
CHANGED
data/lib/sass/tree/prop_node.rb
CHANGED
@@ -39,7 +39,7 @@ module Sass::Tree
|
|
39
39
|
# * This is a child property of another property
|
40
40
|
# * The parent property has a value, and thus will be rendered
|
41
41
|
#
|
42
|
-
# @return [
|
42
|
+
# @return [Integer]
|
43
43
|
attr_accessor :tabs
|
44
44
|
|
45
45
|
# The source range in which the property name appears.
|
data/lib/sass/tree/rule_node.rb
CHANGED
@@ -289,7 +289,9 @@ class Sass::Tree::Visitors::Convert < Sass::Tree::Visitors::Base
|
|
289
289
|
child.line + 1 == nxt.line) ||
|
290
290
|
(child.is_a?(Sass::Tree::VariableNode) && nxt.is_a?(Sass::Tree::VariableNode) &&
|
291
291
|
child.line + 1 == nxt.line) ||
|
292
|
-
(child.is_a?(Sass::Tree::PropNode) && nxt.is_a?(Sass::Tree::PropNode))
|
292
|
+
(child.is_a?(Sass::Tree::PropNode) && nxt.is_a?(Sass::Tree::PropNode)) ||
|
293
|
+
(child.is_a?(Sass::Tree::MixinNode) && nxt.is_a?(Sass::Tree::MixinNode) &&
|
294
|
+
child.line + 1 == nxt.line)
|
293
295
|
""
|
294
296
|
else
|
295
297
|
"\n"
|
@@ -12,7 +12,7 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
|
12
12
|
@tabs = 0
|
13
13
|
@line = 1
|
14
14
|
@offset = 1
|
15
|
-
@result = ""
|
15
|
+
@result = String.new("")
|
16
16
|
@source_mapping = build_source_mapping ? Sass::Source::Map.new : nil
|
17
17
|
@lstrip = nil
|
18
18
|
@in_directive = false
|
data/lib/sass/util.rb
CHANGED
@@ -339,6 +339,18 @@ module Sass
|
|
339
339
|
arr
|
340
340
|
end
|
341
341
|
|
342
|
+
# Like `String.upcase`, but only ever upcases ASCII letters.
|
343
|
+
def upcase(string)
|
344
|
+
return string.upcase unless ruby2_4?
|
345
|
+
string.upcase(:ascii)
|
346
|
+
end
|
347
|
+
|
348
|
+
# Like `String.downcase`, but only ever downcases ASCII letters.
|
349
|
+
def downcase(string)
|
350
|
+
return string.downcase unless ruby2_4?
|
351
|
+
string.downcase(:ascii)
|
352
|
+
end
|
353
|
+
|
342
354
|
# Returns a sub-array of `minuend` containing only elements that are also in
|
343
355
|
# `subtrahend`. Ensures that the return value has the same order as
|
344
356
|
# `minuend`, even on Rubinius where that's not guaranteed by `Array#-`.
|
@@ -418,7 +430,7 @@ module Sass
|
|
418
430
|
# Returns information about the caller of the previous method.
|
419
431
|
#
|
420
432
|
# @param entry [String] An entry in the `#caller` list, or a similarly formatted string
|
421
|
-
# @return [[String,
|
433
|
+
# @return [[String, Integer, (String, nil)]]
|
422
434
|
# An array containing the filename, line, and method name of the caller.
|
423
435
|
# The method name may be nil
|
424
436
|
def caller_info(entry = nil)
|
@@ -636,7 +648,7 @@ module Sass
|
|
636
648
|
|
637
649
|
# Returns an array of ints representing the JRuby version number.
|
638
650
|
#
|
639
|
-
# @return [Array<
|
651
|
+
# @return [Array<Integer>]
|
640
652
|
def jruby_version
|
641
653
|
@jruby_version ||= ::JRUBY_VERSION.split(".").map {|s| s.to_i}
|
642
654
|
end
|
@@ -794,6 +806,19 @@ module Sass
|
|
794
806
|
@ruby1_9_2 = RUBY_VERSION_COMPONENTS == [1, 9, 2]
|
795
807
|
end
|
796
808
|
|
809
|
+
# Whether or not this is running under Ruby 2.4 or higher.
|
810
|
+
#
|
811
|
+
# @return [Boolean]
|
812
|
+
def ruby2_4?
|
813
|
+
return @ruby2_4 if defined?(@ruby2_4)
|
814
|
+
@ruby2_4 =
|
815
|
+
if RUBY_VERSION_COMPONENTS[0] == 2
|
816
|
+
RUBY_VERSION_COMPONENTS[1] >= 4
|
817
|
+
else
|
818
|
+
RUBY_VERSION_COMPONENTS[0] > 2
|
819
|
+
end
|
820
|
+
end
|
821
|
+
|
797
822
|
# Wehter or not this is running under JRuby 1.6 or lower.
|
798
823
|
def jruby1_6?
|
799
824
|
return @jruby1_6 if defined?(@jruby1_6)
|
@@ -941,7 +966,7 @@ module Sass
|
|
941
966
|
# A version of `Enumerable#enum_cons` that works in Ruby 1.8 and 1.9.
|
942
967
|
#
|
943
968
|
# @param enum [Enumerable] The enumerable to get the enumerator for
|
944
|
-
# @param n [
|
969
|
+
# @param n [Integer] The size of each cons
|
945
970
|
# @return [Enumerator] The consed enumerator
|
946
971
|
def enum_cons(enum, n)
|
947
972
|
ruby1_8? ? enum.enum_cons(n) : enum.each_cons(n)
|
@@ -950,7 +975,7 @@ module Sass
|
|
950
975
|
# A version of `Enumerable#enum_slice` that works in Ruby 1.8 and 1.9.
|
951
976
|
#
|
952
977
|
# @param enum [Enumerable] The enumerable to get the enumerator for
|
953
|
-
# @param n [
|
978
|
+
# @param n [Integer] The size of each slice
|
954
979
|
# @return [Enumerator] The consed enumerator
|
955
980
|
def enum_slice(enum, n)
|
956
981
|
ruby1_8? ? enum.enum_slice(n) : enum.each_slice(n)
|
@@ -977,7 +1002,7 @@ module Sass
|
|
977
1002
|
# Returns the ASCII code of the given character.
|
978
1003
|
#
|
979
1004
|
# @param c [String] All characters but the first are ignored.
|
980
|
-
# @return [
|
1005
|
+
# @return [Integer] The ASCII code of `c`.
|
981
1006
|
def ord(c)
|
982
1007
|
ruby1_8? ? c[0] : c.ord
|
983
1008
|
end
|
@@ -1102,11 +1127,11 @@ module Sass
|
|
1102
1127
|
|
1103
1128
|
# Converts the argument into a valid JSON value.
|
1104
1129
|
#
|
1105
|
-
# @param v [
|
1130
|
+
# @param v [Integer, String, Array, Boolean, nil]
|
1106
1131
|
# @return [String]
|
1107
1132
|
def json_value_of(v)
|
1108
1133
|
case v
|
1109
|
-
when
|
1134
|
+
when Integer
|
1110
1135
|
v.to_s
|
1111
1136
|
when String
|
1112
1137
|
"\"" + json_escape_string(v) + "\""
|
@@ -1139,7 +1164,7 @@ module Sass
|
|
1139
1164
|
|
1140
1165
|
# Encodes `value` as VLQ (http://en.wikipedia.org/wiki/VLQ).
|
1141
1166
|
#
|
1142
|
-
# @param value [
|
1167
|
+
# @param value [Integer]
|
1143
1168
|
# @return [String] The encoded value
|
1144
1169
|
def encode_vlq(value)
|
1145
1170
|
if value < 0
|
data/lib/sass/version.rb
CHANGED
@@ -8,7 +8,7 @@ module Sass
|
|
8
8
|
# if it was installed from Git.
|
9
9
|
module Version
|
10
10
|
# Returns a hash representing the version of Sass.
|
11
|
-
# The `:major`, `:minor`, and `:teeny` keys have their respective numbers as
|
11
|
+
# The `:major`, `:minor`, and `:teeny` keys have their respective numbers as Integers.
|
12
12
|
# The `:name` key has the name of the version.
|
13
13
|
# The `:string` key contains a human-readable string representation of the version.
|
14
14
|
# The `:number` key is the major, minor, and teeny keys separated by periods.
|
@@ -41,7 +41,7 @@ module Sass
|
|
41
41
|
# :prerelease_number => 1
|
42
42
|
# }
|
43
43
|
#
|
44
|
-
# @return [{Symbol => String/
|
44
|
+
# @return [{Symbol => String/Integer}] The version hash
|
45
45
|
# @comment
|
46
46
|
# rubocop:disable ClassVars
|
47
47
|
def version
|
@@ -1126,6 +1126,23 @@ foo {
|
|
1126
1126
|
SCSS
|
1127
1127
|
end
|
1128
1128
|
|
1129
|
+
def test_consecutive_mixin_includes
|
1130
|
+
assert_renders <<SASS, <<SCSS
|
1131
|
+
foo
|
1132
|
+
+foo-bar
|
1133
|
+
+foo-bar
|
1134
|
+
|
1135
|
+
a: blip
|
1136
|
+
SASS
|
1137
|
+
foo {
|
1138
|
+
@include foo-bar;
|
1139
|
+
@include foo-bar;
|
1140
|
+
|
1141
|
+
a: blip;
|
1142
|
+
}
|
1143
|
+
SCSS
|
1144
|
+
end
|
1145
|
+
|
1129
1146
|
def test_mixin_include_with_hyphen_conversion_keyword_arg
|
1130
1147
|
assert_renders <<SASS, <<SCSS
|
1131
1148
|
foo
|