sass 3.4.21 → 3.4.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +122 -0
- data/MIT-LICENSE +1 -1
- data/README.md +15 -9
- data/Rakefile +71 -18
- data/VERSION +1 -1
- data/VERSION_DATE +1 -1
- data/lib/sass.rb +7 -0
- data/lib/sass/callbacks.rb +2 -2
- data/lib/sass/css.rb +9 -8
- data/lib/sass/engine.rb +14 -8
- data/lib/sass/environment.rb +8 -1
- data/lib/sass/error.rb +5 -5
- data/lib/sass/exec/sass_convert.rb +14 -2
- data/lib/sass/exec/sass_scss.rb +2 -25
- data/lib/sass/features.rb +2 -2
- data/lib/sass/importers/filesystem.rb +6 -3
- data/lib/sass/plugin/compiler.rb +15 -7
- data/lib/sass/script/css_variable_warning.rb +52 -0
- data/lib/sass/script/functions.rb +5 -5
- data/lib/sass/script/lexer.rb +3 -1
- data/lib/sass/script/parser.rb +67 -15
- data/lib/sass/script/tree/funcall.rb +10 -3
- data/lib/sass/script/tree/node.rb +8 -0
- data/lib/sass/script/tree/operation.rb +7 -0
- data/lib/sass/script/value/base.rb +1 -0
- data/lib/sass/script/value/color.rb +6 -4
- data/lib/sass/script/value/helpers.rb +2 -2
- data/lib/sass/script/value/number.rb +5 -5
- data/lib/sass/scss.rb +0 -2
- data/lib/sass/scss/css_parser.rb +1 -2
- data/lib/sass/scss/parser.rb +20 -10
- data/lib/sass/scss/rx.rb +2 -2
- data/lib/sass/scss/static_parser.rb +11 -13
- data/lib/sass/selector/pseudo.rb +1 -1
- data/lib/sass/selector/sequence.rb +2 -2
- data/lib/sass/selector/simple_sequence.rb +4 -4
- data/lib/sass/stack.rb +2 -2
- data/lib/sass/tree/function_node.rb +1 -1
- data/lib/sass/tree/node.rb +2 -0
- data/lib/sass/tree/visitors/check_nesting.rb +2 -0
- data/lib/sass/tree/visitors/convert.rb +8 -7
- data/lib/sass/tree/visitors/perform.rb +4 -2
- data/lib/sass/tree/visitors/to_css.rb +10 -10
- data/lib/sass/util.rb +8 -7
- data/test/sass-spec.yml +3 -0
- data/test/sass/compiler_test.rb +1 -1
- data/test/sass/css_variable_test.rb +132 -0
- data/test/sass/exec_test.rb +10 -0
- data/test/sass/script_test.rb +1 -1
- data/test/sass/scss/scss_test.rb +10 -0
- metadata +79 -77
- data/lib/sass/scss/script_lexer.rb +0 -15
- data/lib/sass/scss/script_parser.rb +0 -25
@@ -1,15 +0,0 @@
|
|
1
|
-
module Sass
|
2
|
-
module SCSS
|
3
|
-
# A mixin for subclasses of {Sass::Script::Lexer}
|
4
|
-
# that makes them usable by {SCSS::Parser} to parse SassScript.
|
5
|
-
# In particular, the lexer doesn't support `!` for a variable prefix.
|
6
|
-
module ScriptLexer
|
7
|
-
private
|
8
|
-
|
9
|
-
def variable
|
10
|
-
return [:raw, "!important"] if scan(Sass::SCSS::RX::IMPORTANT)
|
11
|
-
_variable(Sass::SCSS::RX::VARIABLE)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
module Sass
|
2
|
-
module SCSS
|
3
|
-
# A mixin for subclasses of {Sass::Script::Parser}
|
4
|
-
# that makes them usable by {SCSS::Parser} to parse SassScript.
|
5
|
-
# In particular, the parser won't raise an error
|
6
|
-
# when there's more content in the lexer once lexing is done.
|
7
|
-
# In addition, the parser doesn't support `!` for a variable prefix.
|
8
|
-
module ScriptParser
|
9
|
-
private
|
10
|
-
|
11
|
-
# @private
|
12
|
-
def lexer_class
|
13
|
-
klass = Class.new(super)
|
14
|
-
klass.send(:include, ScriptLexer)
|
15
|
-
klass
|
16
|
-
end
|
17
|
-
|
18
|
-
# Instead of raising an error when the parser is done,
|
19
|
-
# rewind the StringScanner so that it hasn't consumed the final token.
|
20
|
-
def assert_done
|
21
|
-
@lexer.unpeek!
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|