sass 3.4.21 → 3.4.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +122 -0
  3. data/MIT-LICENSE +1 -1
  4. data/README.md +15 -9
  5. data/Rakefile +71 -18
  6. data/VERSION +1 -1
  7. data/VERSION_DATE +1 -1
  8. data/lib/sass.rb +7 -0
  9. data/lib/sass/callbacks.rb +2 -2
  10. data/lib/sass/css.rb +9 -8
  11. data/lib/sass/engine.rb +14 -8
  12. data/lib/sass/environment.rb +8 -1
  13. data/lib/sass/error.rb +5 -5
  14. data/lib/sass/exec/sass_convert.rb +14 -2
  15. data/lib/sass/exec/sass_scss.rb +2 -25
  16. data/lib/sass/features.rb +2 -2
  17. data/lib/sass/importers/filesystem.rb +6 -3
  18. data/lib/sass/plugin/compiler.rb +15 -7
  19. data/lib/sass/script/css_variable_warning.rb +52 -0
  20. data/lib/sass/script/functions.rb +5 -5
  21. data/lib/sass/script/lexer.rb +3 -1
  22. data/lib/sass/script/parser.rb +67 -15
  23. data/lib/sass/script/tree/funcall.rb +10 -3
  24. data/lib/sass/script/tree/node.rb +8 -0
  25. data/lib/sass/script/tree/operation.rb +7 -0
  26. data/lib/sass/script/value/base.rb +1 -0
  27. data/lib/sass/script/value/color.rb +6 -4
  28. data/lib/sass/script/value/helpers.rb +2 -2
  29. data/lib/sass/script/value/number.rb +5 -5
  30. data/lib/sass/scss.rb +0 -2
  31. data/lib/sass/scss/css_parser.rb +1 -2
  32. data/lib/sass/scss/parser.rb +20 -10
  33. data/lib/sass/scss/rx.rb +2 -2
  34. data/lib/sass/scss/static_parser.rb +11 -13
  35. data/lib/sass/selector/pseudo.rb +1 -1
  36. data/lib/sass/selector/sequence.rb +2 -2
  37. data/lib/sass/selector/simple_sequence.rb +4 -4
  38. data/lib/sass/stack.rb +2 -2
  39. data/lib/sass/tree/function_node.rb +1 -1
  40. data/lib/sass/tree/node.rb +2 -0
  41. data/lib/sass/tree/visitors/check_nesting.rb +2 -0
  42. data/lib/sass/tree/visitors/convert.rb +8 -7
  43. data/lib/sass/tree/visitors/perform.rb +4 -2
  44. data/lib/sass/tree/visitors/to_css.rb +10 -10
  45. data/lib/sass/util.rb +8 -7
  46. data/test/sass-spec.yml +3 -0
  47. data/test/sass/compiler_test.rb +1 -1
  48. data/test/sass/css_variable_test.rb +132 -0
  49. data/test/sass/exec_test.rb +10 -0
  50. data/test/sass/script_test.rb +1 -1
  51. data/test/sass/scss/scss_test.rb +10 -0
  52. metadata +79 -77
  53. data/lib/sass/scss/script_lexer.rb +0 -15
  54. 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