sass 3.2.19 → 3.4.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (246) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +3 -1
  3. data/CODE_OF_CONDUCT.md +10 -0
  4. data/CONTRIBUTING.md +148 -0
  5. data/MIT-LICENSE +1 -1
  6. data/README.md +87 -61
  7. data/Rakefile +119 -15
  8. data/VERSION +1 -1
  9. data/VERSION_DATE +1 -1
  10. data/VERSION_NAME +1 -1
  11. data/bin/sass +1 -1
  12. data/bin/scss +1 -1
  13. data/extra/sass-spec-ref.sh +32 -0
  14. data/extra/update_watch.rb +1 -1
  15. data/lib/sass/cache_stores/base.rb +2 -2
  16. data/lib/sass/cache_stores/chain.rb +2 -1
  17. data/lib/sass/cache_stores/filesystem.rb +8 -12
  18. data/lib/sass/cache_stores/memory.rb +5 -6
  19. data/lib/sass/cache_stores/null.rb +2 -2
  20. data/lib/sass/callbacks.rb +3 -2
  21. data/lib/sass/css.rb +22 -23
  22. data/lib/sass/deprecation.rb +55 -0
  23. data/lib/sass/engine.rb +487 -191
  24. data/lib/sass/environment.rb +172 -58
  25. data/lib/sass/error.rb +21 -24
  26. data/lib/sass/exec/base.rb +199 -0
  27. data/lib/sass/exec/sass_convert.rb +283 -0
  28. data/lib/sass/exec/sass_scss.rb +440 -0
  29. data/lib/sass/exec.rb +5 -703
  30. data/lib/sass/features.rb +47 -0
  31. data/lib/sass/importers/base.rb +50 -7
  32. data/lib/sass/importers/deprecated_path.rb +51 -0
  33. data/lib/sass/importers/filesystem.rb +54 -21
  34. data/lib/sass/importers.rb +1 -0
  35. data/lib/sass/logger/base.rb +9 -5
  36. data/lib/sass/logger/delayed.rb +50 -0
  37. data/lib/sass/logger/log_level.rb +3 -7
  38. data/lib/sass/logger.rb +9 -7
  39. data/lib/sass/media.rb +20 -23
  40. data/lib/sass/plugin/compiler.rb +321 -145
  41. data/lib/sass/plugin/configuration.rb +45 -34
  42. data/lib/sass/plugin/merb.rb +3 -3
  43. data/lib/sass/plugin/rack.rb +3 -3
  44. data/lib/sass/plugin/rails.rb +1 -1
  45. data/lib/sass/plugin/staleness_checker.rb +6 -6
  46. data/lib/sass/plugin.rb +9 -8
  47. data/lib/sass/repl.rb +3 -3
  48. data/lib/sass/script/css_lexer.rb +8 -4
  49. data/lib/sass/script/css_parser.rb +4 -2
  50. data/lib/sass/script/css_variable_warning.rb +52 -0
  51. data/lib/sass/script/functions.rb +1583 -433
  52. data/lib/sass/script/lexer.rb +198 -79
  53. data/lib/sass/script/parser.rb +463 -133
  54. data/lib/sass/script/tree/funcall.rb +313 -0
  55. data/lib/sass/script/tree/interpolation.rb +223 -0
  56. data/lib/sass/script/tree/list_literal.rb +104 -0
  57. data/lib/sass/script/tree/literal.rb +49 -0
  58. data/lib/sass/script/tree/map_literal.rb +64 -0
  59. data/lib/sass/script/{node.rb → tree/node.rb} +42 -14
  60. data/lib/sass/script/tree/operation.rb +156 -0
  61. data/lib/sass/script/tree/selector.rb +26 -0
  62. data/lib/sass/script/tree/string_interpolation.rb +125 -0
  63. data/lib/sass/script/{unary_operation.rb → tree/unary_operation.rb} +6 -6
  64. data/lib/sass/script/tree/variable.rb +57 -0
  65. data/lib/sass/script/tree.rb +16 -0
  66. data/lib/sass/script/{arg_list.rb → value/arg_list.rb} +9 -25
  67. data/lib/sass/script/value/base.rb +241 -0
  68. data/lib/sass/script/value/bool.rb +35 -0
  69. data/lib/sass/script/value/color.rb +698 -0
  70. data/lib/sass/script/value/helpers.rb +272 -0
  71. data/lib/sass/script/value/list.rb +113 -0
  72. data/lib/sass/script/value/map.rb +70 -0
  73. data/lib/sass/script/{null.rb → value/null.rb} +14 -7
  74. data/lib/sass/script/{number.rb → value/number.rb} +196 -86
  75. data/lib/sass/script/value/string.rb +138 -0
  76. data/lib/sass/script/value.rb +11 -0
  77. data/lib/sass/script.rb +38 -11
  78. data/lib/sass/scss/css_parser.rb +25 -5
  79. data/lib/sass/scss/parser.rb +532 -458
  80. data/lib/sass/scss/rx.rb +21 -14
  81. data/lib/sass/scss/static_parser.rb +328 -9
  82. data/lib/sass/scss.rb +0 -2
  83. data/lib/sass/selector/abstract_sequence.rb +36 -19
  84. data/lib/sass/selector/comma_sequence.rb +125 -26
  85. data/lib/sass/selector/pseudo.rb +266 -0
  86. data/lib/sass/selector/sequence.rb +200 -71
  87. data/lib/sass/selector/simple.rb +30 -32
  88. data/lib/sass/selector/simple_sequence.rb +193 -64
  89. data/lib/sass/selector.rb +65 -194
  90. data/lib/sass/shared.rb +2 -2
  91. data/lib/sass/source/map.rb +213 -0
  92. data/lib/sass/source/position.rb +39 -0
  93. data/lib/sass/source/range.rb +41 -0
  94. data/lib/sass/stack.rb +120 -0
  95. data/lib/sass/supports.rb +19 -23
  96. data/lib/sass/tree/at_root_node.rb +83 -0
  97. data/lib/sass/tree/charset_node.rb +1 -1
  98. data/lib/sass/tree/comment_node.rb +4 -4
  99. data/lib/sass/tree/css_import_node.rb +19 -11
  100. data/lib/sass/tree/debug_node.rb +2 -2
  101. data/lib/sass/tree/directive_node.rb +21 -4
  102. data/lib/sass/tree/each_node.rb +8 -8
  103. data/lib/sass/tree/error_node.rb +18 -0
  104. data/lib/sass/tree/extend_node.rb +14 -7
  105. data/lib/sass/tree/for_node.rb +4 -4
  106. data/lib/sass/tree/function_node.rb +14 -4
  107. data/lib/sass/tree/if_node.rb +1 -1
  108. data/lib/sass/tree/import_node.rb +10 -10
  109. data/lib/sass/tree/keyframe_rule_node.rb +15 -0
  110. data/lib/sass/tree/media_node.rb +4 -14
  111. data/lib/sass/tree/mixin_def_node.rb +4 -4
  112. data/lib/sass/tree/mixin_node.rb +21 -8
  113. data/lib/sass/tree/node.rb +59 -15
  114. data/lib/sass/tree/prop_node.rb +42 -24
  115. data/lib/sass/tree/return_node.rb +3 -2
  116. data/lib/sass/tree/root_node.rb +19 -3
  117. data/lib/sass/tree/rule_node.rb +49 -26
  118. data/lib/sass/tree/supports_node.rb +0 -13
  119. data/lib/sass/tree/trace_node.rb +2 -1
  120. data/lib/sass/tree/variable_node.rb +9 -3
  121. data/lib/sass/tree/visitors/base.rb +5 -8
  122. data/lib/sass/tree/visitors/check_nesting.rb +62 -36
  123. data/lib/sass/tree/visitors/convert.rb +111 -76
  124. data/lib/sass/tree/visitors/cssize.rb +206 -74
  125. data/lib/sass/tree/visitors/deep_copy.rb +11 -6
  126. data/lib/sass/tree/visitors/extend.rb +19 -17
  127. data/lib/sass/tree/visitors/perform.rb +308 -190
  128. data/lib/sass/tree/visitors/set_options.rb +21 -7
  129. data/lib/sass/tree/visitors/to_css.rb +273 -92
  130. data/lib/sass/tree/warn_node.rb +2 -2
  131. data/lib/sass/tree/while_node.rb +2 -2
  132. data/lib/sass/util/cross_platform_random.rb +19 -0
  133. data/lib/sass/util/normalized_map.rb +129 -0
  134. data/lib/sass/util/ordered_hash.rb +192 -0
  135. data/lib/sass/util/subset_map.rb +5 -5
  136. data/lib/sass/util/test.rb +0 -1
  137. data/lib/sass/util.rb +620 -193
  138. data/lib/sass/version.rb +22 -24
  139. data/lib/sass.rb +27 -13
  140. data/test/sass/cache_test.rb +62 -20
  141. data/test/sass/callbacks_test.rb +1 -1
  142. data/test/sass/compiler_test.rb +236 -0
  143. data/test/sass/conversion_test.rb +472 -44
  144. data/test/sass/css2sass_test.rb +73 -5
  145. data/test/sass/css_variable_test.rb +132 -0
  146. data/test/sass/encoding_test.rb +219 -0
  147. data/test/sass/engine_test.rb +618 -415
  148. data/test/sass/exec_test.rb +12 -2
  149. data/test/sass/extend_test.rb +419 -168
  150. data/test/sass/functions_test.rb +931 -93
  151. data/test/sass/importer_test.rb +250 -21
  152. data/test/sass/logger_test.rb +1 -1
  153. data/test/sass/more_results/more_import.css +1 -1
  154. data/test/sass/more_templates/more1.sass +10 -10
  155. data/test/sass/more_templates/more_import.sass +2 -2
  156. data/test/sass/plugin_test.rb +26 -34
  157. data/test/sass/results/compact.css +1 -1
  158. data/test/sass/results/complex.css +4 -4
  159. data/test/sass/results/expanded.css +1 -1
  160. data/test/sass/results/import.css +1 -1
  161. data/test/sass/results/import_charset_ibm866.css +2 -2
  162. data/test/sass/results/mixins.css +17 -17
  163. data/test/sass/results/nested.css +1 -1
  164. data/test/sass/results/parent_ref.css +2 -2
  165. data/test/sass/results/script.css +5 -5
  166. data/test/sass/results/scss_import.css +1 -1
  167. data/test/sass/script_conversion_test.rb +97 -39
  168. data/test/sass/script_test.rb +911 -102
  169. data/test/sass/scss/css_test.rb +215 -34
  170. data/test/sass/scss/rx_test.rb +8 -4
  171. data/test/sass/scss/scss_test.rb +2424 -325
  172. data/test/sass/source_map_test.rb +1055 -0
  173. data/test/sass/superselector_test.rb +210 -0
  174. data/test/sass/templates/_partial.sass +1 -1
  175. data/test/sass/templates/basic.sass +10 -10
  176. data/test/sass/templates/bork1.sass +1 -1
  177. data/test/sass/templates/bork5.sass +1 -1
  178. data/test/sass/templates/compact.sass +10 -10
  179. data/test/sass/templates/complex.sass +187 -187
  180. data/test/sass/templates/compressed.sass +10 -10
  181. data/test/sass/templates/expanded.sass +10 -10
  182. data/test/sass/templates/import.sass +2 -2
  183. data/test/sass/templates/importee.sass +3 -3
  184. data/test/sass/templates/mixins.sass +22 -22
  185. data/test/sass/templates/multiline.sass +4 -4
  186. data/test/sass/templates/nested.sass +13 -13
  187. data/test/sass/templates/parent_ref.sass +12 -12
  188. data/test/sass/templates/script.sass +70 -70
  189. data/test/sass/templates/scss_import.scss +2 -1
  190. data/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +1 -1
  191. data/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +2 -2
  192. data/test/sass/templates/subdir/subdir.sass +3 -3
  193. data/test/sass/templates/units.sass +10 -10
  194. data/test/sass/test_helper.rb +1 -1
  195. data/test/sass/util/multibyte_string_scanner_test.rb +11 -3
  196. data/test/sass/util/normalized_map_test.rb +51 -0
  197. data/test/sass/util/subset_map_test.rb +2 -2
  198. data/test/sass/util_test.rb +99 -43
  199. data/test/sass/value_helpers_test.rb +179 -0
  200. data/test/sass-spec.yml +3 -0
  201. data/test/test_helper.rb +42 -12
  202. data/vendor/listen/CHANGELOG.md +1 -228
  203. data/vendor/listen/Gemfile +5 -15
  204. data/vendor/listen/README.md +111 -77
  205. data/vendor/listen/Rakefile +0 -42
  206. data/vendor/listen/lib/listen/adapter.rb +195 -82
  207. data/vendor/listen/lib/listen/adapters/bsd.rb +27 -64
  208. data/vendor/listen/lib/listen/adapters/darwin.rb +21 -58
  209. data/vendor/listen/lib/listen/adapters/linux.rb +23 -55
  210. data/vendor/listen/lib/listen/adapters/polling.rb +25 -34
  211. data/vendor/listen/lib/listen/adapters/windows.rb +50 -46
  212. data/vendor/listen/lib/listen/directory_record.rb +96 -61
  213. data/vendor/listen/lib/listen/listener.rb +135 -37
  214. data/vendor/listen/lib/listen/turnstile.rb +9 -5
  215. data/vendor/listen/lib/listen/version.rb +1 -1
  216. data/vendor/listen/lib/listen.rb +33 -19
  217. data/vendor/listen/listen.gemspec +6 -0
  218. data/vendor/listen/spec/listen/adapter_spec.rb +43 -77
  219. data/vendor/listen/spec/listen/adapters/polling_spec.rb +8 -8
  220. data/vendor/listen/spec/listen/directory_record_spec.rb +81 -56
  221. data/vendor/listen/spec/listen/listener_spec.rb +128 -39
  222. data/vendor/listen/spec/listen_spec.rb +15 -21
  223. data/vendor/listen/spec/spec_helper.rb +4 -0
  224. data/vendor/listen/spec/support/adapter_helper.rb +52 -15
  225. data/vendor/listen/spec/support/directory_record_helper.rb +7 -5
  226. data/vendor/listen/spec/support/listeners_helper.rb +30 -7
  227. metadata +161 -111
  228. data/CONTRIBUTING +0 -3
  229. data/lib/sass/script/bool.rb +0 -18
  230. data/lib/sass/script/color.rb +0 -606
  231. data/lib/sass/script/funcall.rb +0 -245
  232. data/lib/sass/script/interpolation.rb +0 -79
  233. data/lib/sass/script/list.rb +0 -85
  234. data/lib/sass/script/literal.rb +0 -221
  235. data/lib/sass/script/operation.rb +0 -110
  236. data/lib/sass/script/string.rb +0 -51
  237. data/lib/sass/script/string_interpolation.rb +0 -103
  238. data/lib/sass/script/variable.rb +0 -58
  239. data/lib/sass/scss/script_lexer.rb +0 -15
  240. data/lib/sass/scss/script_parser.rb +0 -25
  241. data/test/Gemfile +0 -3
  242. data/test/Gemfile.lock +0 -10
  243. data/vendor/listen/lib/listen/dependency_manager.rb +0 -126
  244. data/vendor/listen/lib/listen/multi_listener.rb +0 -143
  245. data/vendor/listen/spec/listen/dependency_manager_spec.rb +0 -107
  246. data/vendor/listen/spec/listen/multi_listener_spec.rb +0 -174
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee87925e31efa7b2b9f04b31651d51cda825569e
4
- data.tar.gz: dd0e7f384e2a5625754529631f5b510757d1e0d5
3
+ metadata.gz: a8b2d6c079c8e8aec59e0dd45294419919f88239
4
+ data.tar.gz: 5e31ebbe100aa0b066d414ee32e3f29d792907f6
5
5
  SHA512:
6
- metadata.gz: a865f9ebe4cc0a8f54d7f73679ff92c19401425f1f390d5b62e574decc98768a5e5fd96d54fa10e1daf701758c8532e555664e50fcb8664d9f489de7d413ab96
7
- data.tar.gz: 09311860e8236dd537d391efa8e31dd2aaa8744932e4d2ca6a6e3d56174282b173bf614faeee4c4940b2c3ff465131ce783c408f3653ce53f7fc22d118ae90d7
6
+ metadata.gz: 1782f895c1aaeef19491dfb41434ca10a60d28395f53a3ec19f8a65ec21c97625db3325732007fbc3155821c53adf9bcd00ced70e9fe3c1c935295b34f3dfdaf
7
+ data.tar.gz: 39578a844dd4d6e381cb10ced82d5c6782ddd042c79cc5c4c9cc6a69163badbf1ce368526987447b955d44a3d20470ea5e4eae481ea9359d63eea09cab94ca70
data/.yardopts CHANGED
@@ -1,6 +1,6 @@
1
1
  --readme README.md
2
2
  --markup markdown
3
- --markup-provider maruku
3
+ --markup-provider redcarpet
4
4
  --default-return ""
5
5
  --title "Sass Documentation"
6
6
  --query 'object.type != :classvariable'
@@ -9,3 +9,5 @@
9
9
  --protected
10
10
  --no-private
11
11
  --no-highlight
12
+ --tag comment
13
+ --hide-tag comment
@@ -0,0 +1,10 @@
1
+ Sass is more than a technology; Sass is driven by the community of individuals
2
+ that power its development and use every day. As a community, we want to embrace
3
+ the very differences that have made our collaboration so powerful, and work
4
+ together to provide the best environment for learning, growing, and sharing of
5
+ ideas. It is imperative that we keep Sass a fun, welcoming, challenging, and
6
+ fair place to play.
7
+
8
+ [The full community guidelines can be found on the Sass website.][link]
9
+
10
+ [link]: http://sass-lang.com/community-guidelines
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,148 @@
1
+ Contributions are welcomed. Please see the following site for guidelines:
2
+
3
+ [http://sass-lang.com/community#Contribute](http://sass-lang.com/community#Contribute)
4
+
5
+ * [Branches](#main-development-branches)
6
+ * [Feature Branches](#feature-branches)
7
+ * [Experimental Branches](#experimental-branches)
8
+ * [Old Stable Branches](#old-stable-branches)
9
+ * [Versioning](#versioning)
10
+ * [Making Breaking Changes](#making-breaking-changes)
11
+ * [Exceptional Breakages](#exceptional-breakages)
12
+
13
+ ## Branches
14
+
15
+ The Sass repository has three primary development branches, each of which tracks
16
+ a different line of releases (see [versioning](#versioning) below). Each branch
17
+ is regularly merged into the one below: `stable` into `next`, `next` into
18
+ `master`.
19
+
20
+ * The `stable` branch is the default—it's what GitHub shows if you go to
21
+ [sass/sass](https://github.com/sass/sass), and it's the default place for pull
22
+ requests to go. This branch is where we work on the next patch release. Bug
23
+ fixes and documentation improvements belong here, but not new features.
24
+
25
+ * The `next` branch is where we work on the next minor release. It's where most
26
+ new features go, as long as they're not breaking changes. Very occasionally
27
+ breaking changes will go here as well—see
28
+ [exceptional breakages](#exceptional-breakages) below for details.
29
+
30
+ * The `master` branch is where we work on the next major release. It's where
31
+ breaking changes go. We also occasionally decide that a non-breaking feature
32
+ is big enough to warrant saving until the next major release, in which case it
33
+ will also be developed here.
34
+
35
+ Ideally, pull requests would be made against the appropriate
36
+ branch, but don't worry about it too much; if you make a request against the
37
+ wrong branch, the maintainer will take responsibility for rebasing it before
38
+ merging.
39
+
40
+ ### Testing
41
+
42
+ Tests for changes to the Sass language go in
43
+ [sass-spec](https://github.com/sass/sass-spec) so that other
44
+ implementations (E.g. libSass) can be tested against the same test
45
+ suite. The sass-spec repo follows a "trunk development" model in that
46
+ the tests there test against different version of the Sass language (as
47
+ opposed to having branches that track different Sass versions). When
48
+ contributing changes to Sass, update the Gemfile to use sass-spec from a
49
+ branch or fork that has the new tests. When the feature lands in Sass,
50
+ the committer will also merge the corresponding sass-spec changes.
51
+
52
+ The [documentation of
53
+ sass-spec](https://github.com/sass/sass-spec/blob/master/README.md)
54
+ explains how to run sass-spec and contribute changes. In development,
55
+ Change the Gemfile(s) to use the `:path` option against the sass-spec gem
56
+ to link your local checkout of sass and sass-spec together in one or
57
+ both directions.
58
+
59
+ Changes to Sass internals or Ruby Sass specific features (E.g.
60
+ the `sass-convert` tool) should always have tests in the Sass `test`
61
+ directory following the conventions you see there.
62
+
63
+ ### Feature Branches
64
+
65
+ Sometimes it won't be possible to merge a new feature into `next` or `master`
66
+ immediately. It may require longer-term work before it's complete, or we may not
67
+ want to release it as part of any alpha releases of the branch in question.
68
+ Branches like this are labeled `feature.#{name}` and stay on GitHub until
69
+ they're ready to be merged.
70
+
71
+ ### Experimental Branches
72
+
73
+ Not all features pan out, and not all code is a good fit for merging into the
74
+ main codebase. Usually when this happens the code is just discarded, but every
75
+ so often it's interesting or promising enough that it's worth keeping around.
76
+ This is what experimental branches (labeled `experimental.#{name}`) are for.
77
+ While they're not currently in use, they contain code that might be useful in
78
+ the future.
79
+
80
+ ### Old Stable Branches
81
+
82
+ Usually Sass doesn't have the development time to do long-term maintenance of
83
+ old release. But occasionally, very rarely, it becomes necessary. In cases like
84
+ that, a branch named `stable_#{version}` will be created, starting from the last
85
+ tag in that version series.
86
+
87
+ ## Versioning
88
+
89
+ Starting with version 3.5.0, Sass uses [semantic versioning](http://semver.org/)
90
+ to indicate the evolution of its language semantics as much as possible. This
91
+ means that patch releases (such as 3.5.3) contain only bug fixes, minor releases
92
+ (such as 3.6.0) contain backwards-compatible features, and only major releases
93
+ (such as 4.0.0) are allowed to have backwards-incompatible behavior. There are
94
+ [exceptions](#exceptional-breakages), but we try to follow this rule as closely
95
+ as possible.
96
+
97
+ Note, however, that the semantic versioning applies only to the language's
98
+ semantics, not to the Ruby APIs. Although we try hard to keep widely-used APIs
99
+ like [`Sass::Engine`][Sass::Engine] stable, we don't have a strong distinction
100
+ between public and private APIs and we need to be able to freely refactor our
101
+ code.
102
+
103
+ [Sass::Engine]: http://sass-lang.com/documentation/Sass/Engine.html
104
+
105
+ ### Making Breaking Changes
106
+
107
+ Sometimes the old way of doing something just isn't going to work anymore, and
108
+ the new way just can't be made backwards-compatible. In that case, a breaking
109
+ change is necessary. These changes are rarely pleasant, but they contribute to
110
+ making the language better in the long term.
111
+
112
+ Our breaking change process tries to make such changes as clear to users and as
113
+ easy to adapt to as possible. We want to ensure that there's a clear path
114
+ forward for users using functionality that will no longer exist, and that they
115
+ are able to understand what's changing and what they need to do. We've developed
116
+ the following process for this:
117
+
118
+ 1. Deprecate the old behavior [in `stable`](#branches). At minimum, deprecating
119
+ some behavior involves printing a warning when that behavior is used
120
+ explaining that it's going to go away in the future. Ideally, this message
121
+ will also include code that will do the same thing in a non-deprecated way.
122
+ If there's a thorough prose explanation of the change available online, the
123
+ message should link to that as well.
124
+
125
+ 2. If possible, make `sass-convert` (also in `stable`) convert the deprecated
126
+ behavior into a non-deprecated form. This allows users to run `sass-convert
127
+ -R -i` to automatically update their stylesheets.
128
+
129
+ 3. Implement the new behavior in `master`. The sooner this happens, the better:
130
+ it may be unclear exactly what needs to be deprecated until the new
131
+ implementation exists.
132
+
133
+ 4. Release an alpha version of `master` that includes the new behavior. This
134
+ allows users who are dissatisfied with the workaround to use the new
135
+ behavior early. Normally a maintainer will take care of this.
136
+
137
+ ### Exceptional Breakages
138
+
139
+ Because Sass's syntax and semantics are closely tied to those of CSS, there are
140
+ occasionally times when CSS syntax is introduced that overlaps with
141
+ previously-valid Sass. In this case in particular, we may introduce a breaking
142
+ change in a minor version to get back to CSS compatibility as soon as possible.
143
+
144
+ Exceptional breakages still require the full deprecation process; the only
145
+ change is that the new behavior is implemented in `next` rather than `master`.
146
+ Because there are no minor releases between the deprecation and the removal of
147
+ the old behavior, the deprecation warning should be introduced soon as it
148
+ becomes clear that an exceptional breakage is necessary.
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2006-2013 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein
1
+ Copyright (c) 2006-2016 Hampton Catlin, Natalie Weizenbaum, and Chris Eppstein
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,14 +1,14 @@
1
- # Sass [![Gem Version](https://badge.fury.io/rb/sass.png)](http://badge.fury.io/rb/sass)
1
+ # Sass [![Gem Version](https://badge.fury.io/rb/sass.svg)](http://badge.fury.io/rb/sass) [![Inline docs](http://inch-ci.org/github/sass/sass.svg)](http://inch-ci.org/github/sass/sass)
2
2
 
3
- **Sass makes CSS fun again**. Sass is an extension of CSS3,
3
+ **Sass makes CSS fun again**. Sass is an extension of CSS,
4
4
  adding nested rules, variables, mixins, selector inheritance, and more.
5
5
  It's translated to well-formatted, standard CSS
6
6
  using the command line tool or a web-framework plugin.
7
7
 
8
8
  Sass has two syntaxes. The new main syntax (as of Sass 3)
9
9
  is known as "SCSS" (for "Sassy CSS"),
10
- and is a superset of CSS3's syntax.
11
- This means that every valid CSS3 stylesheet is valid SCSS as well.
10
+ and is a superset of CSS's syntax.
11
+ This means that every valid CSS stylesheet is valid SCSS as well.
12
12
  SCSS files use the extension `.scss`.
13
13
 
14
14
  The second, older syntax is known as the indented syntax (or just "Sass").
@@ -49,8 +49,10 @@ see [the Sass reference](http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.ht
49
49
  Sass can also be used with any Rack-enabled web framework.
50
50
  To do so, just add
51
51
 
52
- require 'sass/plugin/rack'
53
- use Sass::Plugin::Rack
52
+ ```ruby
53
+ require 'sass/plugin/rack'
54
+ use Sass::Plugin::Rack
55
+ ```
54
56
 
55
57
  to `config.ru`.
56
58
  Then any Sass files in `public/stylesheets/sass`
@@ -93,18 +95,20 @@ put them in a file called `test.scss` and run `sass test.scss`.
93
95
  Sass avoids repetition by nesting selectors within one another.
94
96
  The same thing works for properties.
95
97
 
96
- table.hl {
97
- margin: 2em 0;
98
- td.ln { text-align: right; }
99
- }
100
-
101
- li {
102
- font: {
103
- family: serif;
104
- weight: bold;
105
- size: 1.2em;
106
- }
107
- }
98
+ ```scss
99
+ table.hl {
100
+ margin: 2em 0;
101
+ td.ln { text-align: right; }
102
+ }
103
+
104
+ li {
105
+ font: {
106
+ family: serif;
107
+ weight: bold;
108
+ size: 1.2em;
109
+ }
110
+ }
111
+ ```
108
112
 
109
113
  ### Variables
110
114
 
@@ -112,19 +116,21 @@ Use the same color all over the place?
112
116
  Need to do some math with height and width and text size?
113
117
  Sass supports variables, math operations, and many useful functions.
114
118
 
115
- $blue: #3bbfce;
116
- $margin: 16px;
119
+ ```scss
120
+ $blue: #3bbfce;
121
+ $margin: 16px;
117
122
 
118
- .content_navigation {
119
- border-color: $blue;
120
- color: darken($blue, 10%);
121
- }
123
+ .content_navigation {
124
+ border-color: $blue;
125
+ color: darken($blue, 10%);
126
+ }
122
127
 
123
- .border {
124
- padding: $margin / 2;
125
- margin: $margin / 2;
126
- border-color: $blue;
127
- }
128
+ .border {
129
+ padding: $margin / 2;
130
+ margin: $margin / 2;
131
+ border-color: $blue;
132
+ }
133
+ ```
128
134
 
129
135
  ### Mixins
130
136
 
@@ -133,23 +139,25 @@ mixins allow you to re-use whole chunks of CSS,
133
139
  properties or selectors.
134
140
  You can even give them arguments.
135
141
 
136
- @mixin table-scaffolding {
137
- th {
138
- text-align: center;
139
- font-weight: bold;
140
- }
141
- td, th { padding: 2px; }
142
- }
143
-
144
- @mixin left($dist) {
145
- float: left;
146
- margin-left: $dist;
147
- }
148
-
149
- #data {
150
- @include left(10px);
151
- @include table-scaffolding;
152
- }
142
+ ```scss
143
+ @mixin table-scaffolding {
144
+ th {
145
+ text-align: center;
146
+ font-weight: bold;
147
+ }
148
+ td, th { padding: 2px; }
149
+ }
150
+
151
+ @mixin left($dist) {
152
+ float: left;
153
+ margin-left: $dist;
154
+ }
155
+
156
+ #data {
157
+ @include left(10px);
158
+ @include table-scaffolding;
159
+ }
160
+ ```
153
161
 
154
162
  A comprehensive list of features is available
155
163
  in the [Sass reference](http://sass-lang.com/documentation/file.SASS_REFERENCE.html).
@@ -171,6 +179,18 @@ When converting from CSS to Sass or SCSS,
171
179
  nesting is applied where appropriate.
172
180
  See `sass-convert --help` for further information and options.
173
181
 
182
+ ### Running locally
183
+
184
+ To run the Sass executables from a source checkout instead of from rubygems:
185
+
186
+ ```
187
+ $ cd sass
188
+ $ bundle
189
+ $ bundle exec sass ...
190
+ $ bundle exec scss ...
191
+ $ bundle exec sass-convert ...
192
+ ```
193
+
174
194
  ## Authors
175
195
 
176
196
  Sass was envisioned by [Hampton Catlin](http://www.hamptoncatlin.com)
@@ -179,23 +199,29 @@ and now occasionally consults on the language issues. Hampton lives in San
179
199
  Francisco, California and works as VP of Technology
180
200
  at [Moovweb](http://www.moovweb.com/).
181
201
 
182
- [Nathan Weizenbaum](http://nex-3.com) is the primary developer and architect of
183
- Sass. His hard work has kept the project alive by endlessly answering forum
184
- posts, fixing bugs, refactoring, finding speed improvements, writing
185
- documentation, implementing new features, and getting Hampton coffee (a fitting
186
- task for a boy-genius). Nathan lives in Seattle, Washington and works on
187
- [Dart](http://dartlang.org) application libraries at Google.
202
+ [Natalie Weizenbaum](https://twitter.com/nex3) is the primary developer and
203
+ architect of Sass. Her hard work has kept the project alive by endlessly
204
+ answering forum posts, fixing bugs, refactoring, finding speed improvements,
205
+ writing documentation, implementing new features, and designing the language.
206
+ Natalie lives in Seattle, Washington and works on [Dart](http://dartlang.org)
207
+ application libraries at Google.
188
208
 
189
- [Chris Eppstein](http://acts-as-architect.blogspot.com) is a core contributor to
190
- Sass and the creator of Compass, the first Sass-based framework. Chris focuses
209
+ [Chris Eppstein](http://twitter.com/chriseppstein) is a core contributor to
210
+ Sass and the creator of [Compass](http://compass-style.org/), the first Sass-based framework, and
211
+ [Eyeglass](http://github.com/sass-eyeglass/eyeglass), a node-sass plugin ecosystem for NPM. Chris focuses
191
212
  on making Sass more powerful, easy to use, and on ways to speed its adoption
192
213
  through the web development community. Chris lives in San Jose, California with
193
- his wife and daughter. He is the Software Architect for
194
- [Caring.com](http://caring.com), a website devoted to the 34 Million caregivers
195
- whose parents are sick or elderly, that uses Haml and Sass.
214
+ his wife and two children. He is an Engineer for
215
+ [LinkedIn.com](http://linkedin.com), where his primary responsibility is to
216
+ maintain Sass and many other Sass-related open source projects.
217
+
218
+ If you use this software, we'd be truly honored if you'd make a
219
+ tax-deductible donation to a non-profit organization and then
220
+ [let us know on twitter](http://twitter.com/SassCSS), so that we can
221
+ thank you. Here's a few that we endorse:
196
222
 
197
- If you use this software, you must pay Hampton a compliment. And
198
- buy Nathan some jelly beans. Maybe pet a kitten. Yeah. Pet that kitty.
223
+ * [Trans Justice Funding Project](http://www.transjusticefundingproject.org/)
224
+ * [United Mitochondrial Disease Foundation](http://umdf.org/compass)
225
+ * [Girl Develop It](https://www.girldevelopit.com/donate)
199
226
 
200
- Beyond that, the implementation is licensed under the MIT License.
201
- Okay, fine, I guess that means compliments aren't __required__.
227
+ Sass is licensed under the MIT License.
data/Rakefile CHANGED
@@ -12,13 +12,116 @@ task :default => :test
12
12
 
13
13
  require 'rake/testtask'
14
14
 
15
- Rake::TestTask.new do |t|
16
- t.libs << 'test'
17
- test_files = FileList[scope('test/**/*_test.rb')]
18
- test_files.exclude(scope('test/rails/*'))
19
- test_files.exclude(scope('test/plugins/*'))
20
- t.test_files = test_files
21
- t.verbose = true
15
+ LINE_SIZE = 80
16
+ DECORATION_CHAR = '#'
17
+
18
+ def print_header(string)
19
+ length = string.length
20
+ puts DECORATION_CHAR * LINE_SIZE
21
+ puts string.center(length + 2, ' ').center(LINE_SIZE, DECORATION_CHAR)
22
+ puts DECORATION_CHAR * LINE_SIZE
23
+ end
24
+
25
+ desc "Run all tests"
26
+ task :test do
27
+ test_cases = [
28
+ {
29
+ 'env' => {'MATHN' => 'true'},
30
+ 'tasks' => ['test:ruby', 'test:spec', :rubocop]
31
+ },
32
+ {
33
+ 'env' => {'MATHN' => 'false'},
34
+ 'tasks' => ['test:ruby']
35
+ }
36
+ ]
37
+
38
+ test_cases.each do |test_case|
39
+ env = test_case['env']
40
+ tasks = test_case['tasks']
41
+
42
+ env.each do |key, value|
43
+ ENV[key] = value
44
+ end
45
+ tasks.each do |task|
46
+ print_header("Running task: #{task}, env: #{env}")
47
+ Rake::Task[task].execute
48
+ end
49
+ end
50
+ end
51
+
52
+ namespace :test do
53
+ desc "Run the ruby tests (without sass-spec)"
54
+ Rake::TestTask.new("ruby") do |t|
55
+ t.libs << 'test'
56
+ test_files = FileList[scope('test/**/*_test.rb')]
57
+ test_files.exclude(scope('test/rails/*'))
58
+ test_files.exclude(scope('test/plugins/*'))
59
+ t.test_files = test_files
60
+ t.warning = true
61
+ t.verbose = true
62
+ end
63
+
64
+ desc "Run sass-spec tests against the local code."
65
+ task :spec do
66
+ require "yaml"
67
+ sass_spec_options = YAML.load_file(scope("test/sass-spec.yml"))
68
+ enabled = sass_spec_options.delete(:enabled)
69
+ unless enabled
70
+ puts "SassSpec tests are disabled."
71
+ next
72
+ end
73
+ if ruby_version_at_least?("1.9.2")
74
+ old_load_path = $:.dup
75
+ begin
76
+ $:.unshift(File.join(File.dirname(__FILE__), "lib"))
77
+ begin
78
+ require 'sass_spec'
79
+ rescue LoadError
80
+ puts "You probably forgot to run: bundle exec rake"
81
+ raise
82
+ end
83
+ default_options = {
84
+ :spec_directory => SassSpec::SPEC_DIR,
85
+ :engine_adapter => SassEngineAdapter.new,
86
+ :generate => false,
87
+ :tap => false,
88
+ :skip => false,
89
+ :verbose => false,
90
+ :filter => "",
91
+ :limit => -1,
92
+ :unexpected_pass => false,
93
+ :nuke => false,
94
+ }
95
+ SassSpec::Runner.new(default_options.merge(sass_spec_options)).run || exit(1)
96
+ ensure
97
+ $:.replace(old_load_path)
98
+ end
99
+ else
100
+ "Skipping sass-spec on ruby versions less than 1.9.2"
101
+ end
102
+ end
103
+ end
104
+
105
+ # ----- Code Style Enforcement -----
106
+
107
+ def ruby_version_at_least?(version_string)
108
+ ruby_version = Gem::Version.new(RUBY_VERSION.dup)
109
+ version = Gem::Version.new(version_string)
110
+ ruby_version >= version
111
+ end
112
+
113
+ begin
114
+ require 'rubocop/rake_task'
115
+ RuboCop = Rubocop unless defined?(RuboCop)
116
+ RuboCop::RakeTask.new do |t|
117
+ t.patterns = FileList["lib/**/*"]
118
+ end
119
+ rescue LoadError
120
+ task :rubocop do
121
+ puts "Rubocop is disabled."
122
+ puts "Passing this check is required in order for your patch to be accepted."
123
+ puts "Install Rubocop and then run the style check with: rake rubocop."
124
+ end
22
125
  end
23
126
 
24
127
  # ----- Packaging -----
@@ -79,16 +182,13 @@ end
79
182
 
80
183
  desc "Install Sass as a gem. Use SUDO=1 to install with sudo."
81
184
  task :install => [:package] do
82
- gem = RUBY_PLATFORM =~ /java/ ? 'jgem' : 'gem'
185
+ gem = RUBY_PLATFORM =~ /java/ ? 'jgem' : 'gem'
83
186
  sh %{#{'sudo ' if ENV["SUDO"]}#{gem} install --no-ri pkg/sass-#{get_version}}
84
187
  end
85
188
 
86
- desc "Release a new Sass package to Rubyforge."
189
+ desc "Release a new Sass package to RubyGems.org."
87
190
  task :release => [:check_release, :package] do
88
- name = File.read(scope("VERSION_NAME")).strip
89
191
  version = File.read(scope("VERSION")).strip
90
- # sh %{rubyforge add_release sass sass "#{name} (v#{version})" pkg/sass-#{version}.gem}
91
- # sh %{rubyforge add_file sass sass "#{name} (v#{version})" pkg/sass-#{version}.tar.gz}
92
192
  sh %{gem push pkg/sass-#{version}.gem}
93
193
  end
94
194
 
@@ -142,7 +242,11 @@ task :release_edge do
142
242
  sh %{git reset --hard origin/master}
143
243
  sh %{rake package}
144
244
  version = get_version
145
- # sh %{rubyforge add_release sass sass "Bleeding Edge (v#{version})" pkg/sass-#{version}.gem}
245
+ if version.include?('.rc.')
246
+ puts "#{'=' * 20} Not releasing edge gem for RC version"
247
+ next
248
+ end
249
+
146
250
  sh %{gem push pkg/sass-#{version}.gem}
147
251
  end
148
252
  end
@@ -193,7 +297,7 @@ begin
193
297
  task :undocumented do
194
298
  opts = ENV["YARD_OPTS"] || ""
195
299
  ENV["YARD_OPTS"] = opts.dup + <<OPTS
196
- --list --query "
300
+ --list --tag comment --hide-tag comment --query "
197
301
  object.docstring.blank? &&
198
302
  !(object.type == :method && object.is_alias?)"
199
303
  OPTS
@@ -289,7 +393,7 @@ END
289
393
  file = File.read(scope("test/sass/templates/#{file || 'complex'}.sass"))
290
394
  result = RubyProf.profile { times.times { Sass::Engine.new(file).render } }
291
395
 
292
- RubyProf.const_get("#{(ENV['OUTPUT'] || 'Flat').capitalize}Printer").new(result).print
396
+ RubyProf.const_get("#{(ENV['OUTPUT'] || 'Flat').capitalize}Printer").new(result).print
293
397
  end
294
398
  rescue LoadError; end
295
399
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.2.19
1
+ 3.4.25
data/VERSION_DATE CHANGED
@@ -1 +1 @@
1
- 05 April 2014 19:55:56 UTC
1
+ 07 July 2017 22:00:34 UTC
data/VERSION_NAME CHANGED
@@ -1 +1 @@
1
- Media Mark
1
+ Selective Steve
data/bin/sass CHANGED
@@ -9,5 +9,5 @@ rescue LoadError
9
9
  end
10
10
  require 'sass/exec'
11
11
 
12
- opts = Sass::Exec::Sass.new(ARGV)
12
+ opts = Sass::Exec::SassScss.new(ARGV, :sass)
13
13
  opts.parse!
data/bin/scss CHANGED
@@ -9,5 +9,5 @@ rescue LoadError
9
9
  end
10
10
  require 'sass/exec'
11
11
 
12
- opts = Sass::Exec::Scss.new(ARGV)
12
+ opts = Sass::Exec::SassScss.new(ARGV, :scss)
13
13
  opts.parse!
@@ -0,0 +1,32 @@
1
+ #!/bin/bash -e
2
+ # Copyright 2016 Google Inc. Use of this source code is governed by an MIT-style
3
+ # license that can be found in the LICENSE file or at
4
+ # https://opensource.org/licenses/MIT.
5
+
6
+ # Echoes the sass-spec Git ref that should be checked out for the current Travis
7
+ # run. If we're running specs for a pull request which refers to a sass-spec
8
+ # pull request, we'll run against the latter rather than sass-spec master.
9
+
10
+ default=master
11
+
12
+ if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
13
+ >&2 echo "TRAVIS_PULL_REQUEST: $TRAVIS_PULL_REQUEST."
14
+ >&2 echo "Ref: $default."
15
+ echo "$default"
16
+ exit 0
17
+ fi
18
+
19
+ >&2 echo "Fetching pull request $TRAVIS_PULL_REQUEST..."
20
+
21
+ JSON=$(curl -L -sS https://api.github.com/repos/sass/sass/pulls/$TRAVIS_PULL_REQUEST)
22
+
23
+ RE_SPEC_PR="sass\/sass-spec(#|\/pull\/)([0-9]+)"
24
+
25
+ if [[ $JSON =~ $RE_SPEC_PR ]]; then
26
+ ref="pull/${BASH_REMATCH[2]}/head"
27
+ >&2 echo "Ref: $ref."
28
+ echo "$ref"
29
+ else
30
+ >&2 echo "Ref: $default."
31
+ echo "$default"
32
+ fi
@@ -7,7 +7,7 @@ enable :lock
7
7
  Dir.chdir(File.dirname(__FILE__) + "/..")
8
8
 
9
9
  post "/" do
10
- puts "Recieved payload!"
10
+ puts "Received payload!"
11
11
  puts "Rev: #{`git name-rev HEAD`.strip}"
12
12
  system %{rake handle_update --trace REF=#{JSON.parse(params["payload"])["ref"].inspect}}
13
13
  end
@@ -27,7 +27,7 @@ module Sass
27
27
 
28
28
  # Retrieved cached contents.
29
29
  # Must be implemented by all subclasses.
30
- #
30
+ #
31
31
  # Note: if the key exists but the sha or version have changed,
32
32
  # then the key may be deleted by the cache store, if it wants to do so.
33
33
  #
@@ -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 obj [Object] The object to cache.
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
@@ -22,7 +22,8 @@ module Sass
22
22
  # @see Base#retrieve
23
23
  def retrieve(key, sha)
24
24
  @caches.each_with_index do |c, i|
25
- next unless obj = c.retrieve(key, sha)
25
+ obj = c.retrieve(key, sha)
26
+ next unless obj
26
27
  @caches[0...i].each {|prev| prev.store(key, sha, obj)}
27
28
  return obj
28
29
  end