Skip to content
Newer
Older
100644 4142 lines (2866 sloc) 140 KB
04658ce @chriseppstein [Sass] Add a changelog.
chriseppstein authored
1 # Sass Changelog
2
3 * Table of contents
4 {:toc}
5
14d88e3 @nex3 Better unify selectors containing unique simple selectors.
nex3 authored
6 ## 4.0.0 (Unreleased)
7
8 * Combine ids and `:root` when unifying selectors with `@extend` and selector
9 functions.
10
90e7515 @nex3 Changelog for 8091bcea.
nex3 authored
11 * Add a `$weight` parameter to `invert()`.
12
05c15ea @nex3 Add changelog entries for interpolation.
nex3 authored
13 ### Backwards Incompatibilities -- Must Read!
14
15 Certain ways of using `#{}` without quotes in property and variable values,
16 which were deprecated in version 3.4.20, have been removed entirely in order to
17 simplify the feature.
18
19 Previously, `#{}` behaved unpredictably. If it was used near operators, it would
20 cause those operators to become part of an unquoted string instead of having
21 their normal meaning. This wan't an especially useful feature, and it made it
22 hard to reason about some code that included `#{}`.
23
24 Now `#{}` just returns an unquoted string that acts like any other unquoted
25 string. For example, `foo + #{$var}` does the same thing as `foo + $var`,
26 instead of doing the same thing as `unquote("foo + #{$var}")`.
27
28 For more details, see [this blog post][interp-blog] and
29 [the GitHub issue in which it was planned][interp-issue].
30
957099e @chriseppstein Bump VERSION to 3.4.21.
chriseppstein authored
31 ## 3.4.21 (11 January 2016)
4e286c5 @chriseppstein Update CHANGELOG for recent bug fixes.
chriseppstein authored
32
33 * Consistent output formatting for numbers close to an integer.
34 [Issue #1931](https://github.com/sass/sass/issues/1931)
56479fd @nex3 Add whitespace between changelog entries.
nex3 authored
35
4e286c5 @chriseppstein Update CHANGELOG for recent bug fixes.
chriseppstein authored
36 * Correctly round negative numbers that were almost but not quite a
56479fd @nex3 Add whitespace between changelog entries.
nex3 authored
37 whole number (slightly greater than the negative number).
4e286c5 @chriseppstein Update CHANGELOG for recent bug fixes.
chriseppstein authored
38 [Issue #1938](https://github.com/sass/sass/issues/1938)
56479fd @nex3 Add whitespace between changelog entries.
nex3 authored
39
4e286c5 @chriseppstein Update CHANGELOG for recent bug fixes.
chriseppstein authored
40 * Don't strip escaped semicolons from compressed output.
41 [Issue #1932](https://github.com/sass/sass/issues/1932)
56479fd @nex3 Add whitespace between changelog entries.
nex3 authored
42
4e286c5 @chriseppstein Update CHANGELOG for recent bug fixes.
chriseppstein authored
43 * Only compress around dashes within nth selectors.
44 [Issue #1933](https://github.com/sass/sass/issues/1933)
56479fd @nex3 Add whitespace between changelog entries.
nex3 authored
45
26e16c0 @chriseppstein Only compress spaces around commas separating selector sequences.
chriseppstein authored
46 * Selector compression of whitespace around commas was affecting attribute values.
47 [Issue #1947](https://github.com/sass/sass/issues/1947)
4e286c5 @chriseppstein Update CHANGELOG for recent bug fixes.
chriseppstein authored
48
fe0f13e @nex3 Fix a subtraction edge case.
nex3 authored
49 * Make subtraction work when a unit is followed directly by a hyphen and then a
50 period. For example, `1em-.75em` now returns `0.25em` rather than `1em
51 -0.75em`. This is consistent with the behavior when the subtrahend begins with
52 a `0`. [Issue #1954](https://github.com/sass/sass/issues/1954)
53
9077d95 @nex3 Bump VERSION to 3.4.20.
nex3 authored
54 ## 3.4.20 (09 December 2015)
4e3e1d5 @nex3 Fix a rounding bug.
nex3 authored
55
56 * Fix a bug with the rounding changes from 3.4.14 and 3.4.15 where some negative
57 numbers would incorrectly be rounded up instead of down.
58
6e351f0 @chriseppstein Better compression for `:nth` pseudoselectors with subtraction.
chriseppstein authored
59 * Better compression for `:nth` pseudoselectors with subtraction.
60 [Issue #1650](https://github.com/sass/sass/issues/1874)
61
35d68ad @chriseppstein Support the @import supports() clause.
chriseppstein authored
62 * Add support for the new `supports()` clause for CSS `@import` directives.
63
0296716 @chriseppstein Respect precision when very close to half an int.
chriseppstein authored
64 * Rounding numbers now respects Sass's precision setting for numbers very
65 close to half an integer.
66
fb53792 @nex3 Style changes.
nex3 authored
67 * Add support for the `q` unit, representing one quarter of a millimeter.
0128ede @royels Add a q unit.
royels authored
68
6387bf4 @nex3 Add a CHANGELOG entry.
nex3 authored
69 * Mitigate a race condition when multiple threads are using the same
70 `Sass::Plugin` object at once.
71
85b3662 @chriseppstein Update CHANGELOG for omitted leading zeros in compressed mode.
chriseppstein authored
72 * In compressed mode, numbers between -1 and 1 now have the
73 leading 0 omitted.
74
a4bb4fb @nex3 Merge branch 'interp-deprecation' into stable
nex3 authored
75 * Source maps now include source ranges for comments.
76
f633ac5 @nex3 Deprecate messy interpolation corner cases.
nex3 authored
77 ### Deprecation -- Must Read!
78
79 Certain ways of using `#{}` without quotes in property and variable values have
80 been deprecated in order to simplify the feature.
81
82 Currently, `#{}` behaves unpredictably. If it's used near operators, it will
83 cause those operators to become part of an unquoted string instead of having
84 their normal meaning. This isn't an especially useful feature, and it makes it
85 hard to reason about some code that includes `#{}`, so we're getting rid of it.
86
87 In the new world, `#{}` just returns an unquoted string that acts like any other
88 unquoted string. For example, `foo + #{$var}` will now do the same thing as
89 `foo + $var`, instead of doing the same thing as `unquote("foo + #{$var}")`.
90
91 In order to ease the transition, Sass will now emit deprecation warnings for all
92 uses of `#{}` that will change behavior in 4.0. We don't anticipate many
93 warnings to appear in practice, and you can fix most of them automatically by
94 running `sass-convert --in-place` on the affected files.
95
96 For more details, see [the blog post on the deprecation][interp-blog] and
97 [the GitHub issue in which it was planned][interp-issue].
98
d1f43c4 @nex3 Fix the link to the interpolation blog post.
nex3 authored
99 [interp-blog]: http://sass.logdown.com/posts/308328-cleaning-up-interpolation
f633ac5 @nex3 Deprecate messy interpolation corner cases.
nex3 authored
100 [interp-issue]: https://github.com/sass/sass/issues/1778
101
f4a7ddb @nex3 Bump VERSION to 3.4.19
nex3 authored
102 ## 3.4.19 (09 October 2015)
cc96f0c @chriseppstein Handle floating point errors more gracefully.
chriseppstein authored
103
104 * Sass numeric equality now better handles float-point errors. Any
105 numbers that are within `1 / (10 ^ (precision + 1))` of each other are
106 now considered equal.
107
c39e77f @nex3 Fix stdin relative imports.
nex3 authored
108 * Allow importing relative paths on standard input even when `--stdin` isn't
109 explicitly passed.
110
08dceaa @nex3 Fix string interpolation conversion edge cases.
nex3 authored
111 * Fix some busted edge cases with `sass-convert` and string interpolation.
fa41d57 @chriseppstein Update CHANGELOG
chriseppstein authored
112
4940258 @chriseppstein Update changelog for the removal of ruby 1.8.6 support from the code.
chriseppstein authored
113 * Since we require ruby 1.8.7 or greater, support for ruby 1.8.6 was
114 removed from the code.
115
657b0e9 @chriseppstein Update CHANGELOG
chriseppstein authored
116 * Small performance enhancements.
117
3761650 @chriseppstein 3.4.18
chriseppstein authored
118 ## 3.4.18 (25 August 2015)
119
1bde903 @amitsuroliya Correcting spell typos
amitsuroliya authored
120 * A fix in 3.4.17 to address unnecessary semi-colons in compressed mode
3761650 @chriseppstein 3.4.18
chriseppstein authored
121 was too aggressive and removed some that *were* necessary. This is now
122 fixed.
123
58578bd @chriseppstein Update CHANGELOG for 3.4.17
chriseppstein authored
124 ## 3.4.17 (21 August 2015)
125
126 * Allow passing calc values to rgb/hsl color constructors.
127
128 * The source map end character for lists now correctly uses the end of
129 the list instead of the end of the first element in the list.
845605a @nex3 Merge remote-tracking branch 'origin/stable' into stable
nex3 authored
130
131 * Fix up some edge cases where extra semicolons could be added to unknown
132 directives in compressed mode.
133
58578bd @chriseppstein Update CHANGELOG for 3.4.17
chriseppstein authored
134 * If you try to do a stupid color operation with a stupid value, the
135 error message will now be less stupid than it was.
136
1fc8d6d @nex3 Fix an @extend edge case with child selectors.
nex3 authored
137 * Make `is-superselector("a > c d", "a > b c d")` return `false`. This also
138 fixes some related `@extend` behavior.
139
215581a @nex3 Be consistent about forcing division in lists.
nex3 authored
140 * A `/` in a parenthesized list is consistently treated as a plain `/` unless it
141 meets the criteria for being treated as division.
142
fdd9021 @nex3 Fix literal /es in sass-convert.
nex3 authored
143 * In `sass-convert`, ensure that literal `/`es are preserved.
144
b4bbd96 @nex3 Bump VERSION to 3.4.16.
nex3 authored
145 ## 3.4.16 (10 July 2015)
fec183e @nex3 Add a changelog entry.
nex3 authored
146
147 * When converting from Sass to SCSS or vice versa, double-space around nested
148 rules the same as around top-level rules.
149
dc1f4f8 @nex3 Add compatibility with listen 3.
nex3 authored
150 * Compatibility with listen 3.
151
91e01d0 @nex3 Fix minus/hyphen ambiguity again.
nex3 authored
152 * Parse a minus operator with no surrounding whitespace (e.g. 20px-10px) the
153 same regardless of whether it's being used in a static property.
7d3c6c3 @xzyfer Fix some separator issues in compressed mode.
xzyfer authored
154
9d1000d @nex3 Bump VERSION to 3.4.15.
nex3 authored
155 ## 3.4.15 (22 June 2015)
2c537b1 @nex3 Further improve rounding.
nex3 authored
156
157 * Further improve rounding for various numeric operations.
158
70d302e @nex3 Be more explicit about immutable functions.
nex3 authored
159 * Be more explicit in the function documentation about functions being
160 immutable.
161
14ec0d0 @nex3 Properly round in operator-based color operations.
nex3 authored
162 * Improve rounding in operator-based color operations.
163
eb0c8ce @nex3 Deprecate working directory imports for stdin.
nex3 authored
164 ### Deprecations -- Must Read!
165
166 * When using `--stdin` with the `sass` or `scss` executables, importing relative
167 to the working directory is deprecated. Having the working directory on the
168 load path was deprecated in 3.3 and removed in 3.4, but due to an oversight
169 the deprecation process never happened for files read over standard input in
170 particular. This is the first step of that process.
171
2e0f33b @nex3 Bump VERSION to 3.4.14.
nex3 authored
172 ## 3.4.14 (22 May 2015)
e9fa4e3 @nex3 Add a CHANGELOG entry.
nex3 authored
173
174 * Further avoid race conditions when caching.
175
b7dce00 @nex3 Don't emit multiple unquote() warnings for the same line.
nex3 authored
176 * Only emit one warning for each line that uses the deprecated form of
177 `unquote()`.
178
e000e98 @nex3 Fix @supports parsing and emitting.
nex3 authored
179 * Stop parsing and emitting invalid `@supports` directives.
180
abb1543 @nex3 Deprecate 1em != 1 as well.
nex3 authored
181 * Add a deprecation warning for using `!=` to compare a number with units to a
182 number without. Such a warning already existed for `==`.
183
ac2dc4e @nex3 Round, don't truncate, color operation results.
nex3 authored
184 * Improve rounding of the results of color operations.
185
d26e6fa @nex3 Bump VERSION to 3.4.13.
nex3 authored
186 ## 3.4.13 (26 February 2015)
187
188 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.4.13).
4a97cea @nex3 Add text about hyphens and underscores to the reference.
nex3 authored
189
190 * Be clearer in the reference about hyphen/underscore equivalence.
191
4e41909 @nex3 Fix @keyframes parsing in CSS.
nex3 authored
192 * `@keyframes` rules are now converted from CSS properly.
193
787b6ef @nex3 Fix an @extend edge-case crash.
nex3 authored
194 * Extending a selector that contains a non-final pseudo-class no longer crashes.
195
cc3a41a @nex3 Unify :root when extending.
nex3 authored
196 * When `@extending`, only a single `:root` element will be retained.
197
ddb2aa1 @nex3 Bump VERSION to 3.4.12.
nex3 authored
198 ## 3.4.12 (13 February 2015)
199
200 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.4.12).
cda7a32 @nex3 Fix interpolation in interpolation.
nex3 authored
201
202 * Non-string interpolation within string interpolation is now parsed correctly.
203
54c9ee4 @nex3 Fix random() with an integer represented by a float.
nex3 authored
204 * `random()` now returns the correct result if it has an integer value
205 but a float representation.
206
57513c6 @nex3 Bump VERSION to 3.4.11.
nex3 authored
207 ## 3.4.11 (30 January 2015)
208
209 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.4.11).
a487d27 @nex3 Fix parent selectors both in and out of function pseudos.
nex3 authored
210
211 * Parent selectors used both outside and inside a pseudo selector
212 (e.g. `&:not(&--foo)`) now compile correctly.
b6f455a @nex3 Fix interpolation in multiline indented selectors.
nex3 authored
213
214 * Interpolation in a multiline indented-syntax selector is no longer
215 omitted.
4214c81 @nex3 Add a stack trace to the unquote() deprecation warning.
nex3 authored
216
217 * Add a stack trace to the `unquote()` deprecation warning.
7203510 @nex3 Add extra parens when converting space lists.
nex3 authored
218
219 * When converting a space-separated list with `sass-convert`, add
220 parentheses when they make it easier to read even if they aren't
221 strictly required.
1bde903 @amitsuroliya Correcting spell typos
amitsuroliya authored
222
625fb60 @nex3 Deprecate update semantics without --update.
nex3 authored
223 ### Deprecations -- Must Read!
224
225 * Compiling directories on the command line without using either
226 `--watch` or `--update` is deprecated. This only worked
227 inconsistently before.
a487d27 @nex3 Fix parent selectors both in and out of function pseudos.
nex3 authored
228
57513c6 @nex3 Bump VERSION to 3.4.11.
nex3 authored
229 ## 3.4.10 (16 January 2015)
9bc12a9 @nex3 Bump VERSION to 3.4.10.
nex3 authored
230
231 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.4.10).
fbb689c @nex3 Add a changelog entry for previous.
nex3 authored
232
233 * `inspect()` no longer adds extra parentheses to nested maps.
490c2f4 @nex3 Fix the docs for random().
nex3 authored
234
235 * Update the documentation of the `random()` function to accurate reflect its
236 behavior.
237
dc44975 @nex3 Deprecate passing non-string values to unquote().
nex3 authored
238 ### Deprecations -- Must Read!
239
240 * Passing a non-string value to the `unquote()` function didn't do
241 anything useful and is now deprecated. In future, this function will
242 follow its documentation and emit an error if a non-string value is
243 passed.
244
a28061e @nex3 Deprecate functions name calc, element, expression, or url.
nex3 authored
245 * Defining a function named `calc`, `element`, `expression`, or `url`
246 (or the former two with a vendor-style prefix) is now deprecated.
247 These functions were already shadowed by CSS functions with special
248 parsing rules, and so were impossible to use anyway. In the future,
249 attempting to define these functions will throw an error.
250
008d13e @nex3 Bump VERSION to 3.4.9.
nex3 authored
251 ## 3.4.9 (24 November 2014)
252
253 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.4.9).
d45ab0b @nex3 Fix interpolation conversion in calc().
nex3 authored
254
4c003d3 @nex3 Compatibility with listen >=2.7.12.
nex3 authored
255 * Fix an incompatibility with listen 2.7.12 and later.
256
d45ab0b @nex3 Fix interpolation conversion in calc().
nex3 authored
257 * Properly handle interpolation within `calc()` and similar functions
258 with `sass-convert`.
259
a62f817 @nex3 Fix @extend !optional conversion to SCSS.
nex3 authored
260 * Properly handle conversion of `@extend` with `!optional` to SCSS.
261
900038f @nex3 Don't add extra whitespace when converting @at-root to SCSS.
nex3 authored
262 * Properly handle conversion of `@at-root` with a selector to SCSS.
263
4c003d3 @nex3 Compatibility with listen >=2.7.12.
nex3 authored
264 * Don't crash on selectors containing escape codes.
265
ea254a0 @nex3 Bump VERSION to 3.4.8.
nex3 authored
266 ## 3.4.8 (14 November 2014)
267
268 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.4.8).
a128ada @nex3 Don't add complex selectors to :not() if that would break browsers.
nex3 authored
269
270 * When `@extending` selectors inside `:not()`, don't add a complex
271 selector where none existed before to avoid breaking selectors on
272 browsers that don't support that.
273
85b3be9 @nex3 Add a deprecation warning for using units in rgba/hsla alpha parameters.
nex3 authored
274 * Add a deprecation warning for passing numbers with units to the alpha
275 arguments to `rgba()` and `hsla()`. In a future release, a percentage will be
276 interpreted according to [the spec][alpha value] and other units will produce
277 errors.
278
279 [alpha value]: http://dev.w3.org/csswg/css-color/#typedef-alpha-value
280
92e3b02 @nex3 Bump VERSION to 3.4.7.
nex3 authored
281 ## 3.4.7 (31 October 2014)
d7a986b @nex3 Fix superselector detection for non-descendant selectors.
nex3 authored
282
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
283 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.4.7).
284
b330e15 @nex3 Fix selector pseudoclass extension.
nex3 authored
285 * Stop crashing when extending selector pseudoclasses such as `:not()`.
286
d7a986b @nex3 Fix superselector detection for non-descendant selectors.
nex3 authored
287 * `@extend` resolution and `is-superselector()` no longer consider `.foo > .baz`
288 to be a superselector of `.foo > .bar > .baz`.
289
979482a @xzyfer Add set-nth to the list functions group in the function documentation
xzyfer authored
290 * Update documentation for `set-nth`
291
ec90542 @nex3 Deprecate unitless numbers equaling unitful numbers.
nex3 authored
292 ### Deprecations -- Must Read!
293
294 * Sass will now print a warning when `==` is used for numbers when one
295 number doesn't have units, the other does, and their numeric values
296 are equal. In the future, unitless numbers will never be equal to
297 numbers with units.
298
5389942 @nex3 Bump VERSION to 3.4.6.
nex3 authored
299 ## 3.4.6 (16 October 2014)
7ac9669 @nex3 Make parent selectors work in selector pseudoclasses.
nex3 authored
300
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
301 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.4.6).
302
7ac9669 @nex3 Make parent selectors work in selector pseudoclasses.
nex3 authored
303 * Parent selectors now work in selector pseudoclasses (for example, `:not(&)`).
304
7ac58c2 @nex3 Fix a crash for @for loops.
nex3 authored
305 * `@for` loops no longer crash when one bound is an integer-like float.
306
11e60d8 @nitoyon Fix exception on Sass::Importers::Filesystem#eql?
nitoyon authored
307 * Fix exception on `Sass::Importers::Filesystem#eql?`.
308
899fb25 @nex3 Bump VERSION to 3.4.5.
nex3 authored
309 ## 3.4.5 (19 September 2014)
ff9fd27 @nex3 Fix sass-convert --recursive.
nex3 authored
310
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
311 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.4.5).
312
ff9fd27 @nex3 Fix sass-convert --recursive.
nex3 authored
313 * Fix `sass-convert --recursive`.
314
e68d72b @nex3 Watch the working directory for changed partials with sass --watch.
nex3 authored
315 * When using `sass --watch`, imported stylesheets within the working directory
316 will be watched for changes. This matches the behavior of Sass 3.3.
317
a603f00 @nex3 Set exit code 65 when the compiler fails due to a Sass error.
nex3 authored
318 * Set exit code 65, indicating a [data error][], when the compiler fails due to
319 a Sass error.
320
321 [data error]: http://www.freebsd.org/cgi/man.cgi?query=sysexits
322
d0dbe59 @nex3 Bump VERSION to 3.4.4.
nex3 authored
323 ## 3.4.4 (12 September 2014)
93232f4 @nex3 Work around ruby/ruby#713.
nex3 authored
324
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
325 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.4.4).
326
93232f4 @nex3 Work around ruby/ruby#713.
nex3 authored
327 * Produce more useful error messages when paths have incompatible encodings on
328 Windows.
329
4fabedf @nex3 Support arbitrary identifiers in keyframes selectors.
nex3 authored
330 * Allow `@keyframes` selectors to use arbitrary identifiers to support libraries
331 like Skrollr.
332
1d8dc02 @nex3 Preserve double-star comments in sass-convert.
nex3 authored
333 * `sass-convert` now preserves double-star mutliline comments (e.g.
334 `/** foo */`).
335
56a8987 @nex3 Bump VERSION to 3.4.3.
nex3 authored
336 ## 3.4.3 (4 September 2014)
12b6ef6 @nex3 Add a CHANGELOG entry for the previous fix.
nex3 authored
337
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
338 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.4.3).
339
12b6ef6 @nex3 Add a CHANGELOG entry for the previous fix.
nex3 authored
340 * Don't crash when a non-existent directory is on the load path.
341
a1865aa @nex3 Fix --watch on Windows.
nex3 authored
342 * Fix `--watch` on Windows.
343
159990d @nex3 Add a warning for too many varargs.
nex3 authored
344 * Passing too many arguments to a function via `...` is now a warning rather
345 than silently discarding additional arguments. In future versions of Sass,
346 this will become an error.
347
33010e4 @nex3 Bump VERSION to 3.4.2.
nex3 authored
348 ## 3.4.2 (28 August 2014)
0f06861 @nex3 Fix sass-convert output format detection.
nex3 authored
349
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
350 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.4.2).
351
0f06861 @nex3 Fix sass-convert output format detection.
nex3 authored
352 * Properly detect the output format from the output filename for `sass-convert`.
353
1081acf @nex3 Properly parse interpolation immediately following a string.
nex3 authored
354 * Properly parse interpolation immediately following a string.
355
d8ac7a4 @nex3 Fix --watch with symlinks.
nex3 authored
356 * Fix `--watch` for symlinked files and directories.
357
ca2f302 @nex3 Bump VERSION to 3.4.1.
nex3 authored
358 ## 3.4.1 (22 August 2014)
97bedb1 @nex3 Fix attribute selector parsing in almost_any_value.
nex3 authored
359
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
360 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.4.1).
361
ea9a556 @nex3 Fix --watch.
nex3 authored
362 * Fix `--watch`.
363
c717726 @nex3 Avoid generating :not selectors that fail on older browsers.
nex3 authored
364 * Don't generate `:not()` selectors that contain more than one complex selector.
365
97bedb1 @nex3 Fix attribute selector parsing in almost_any_value.
nex3 authored
366 * Fix a parsing bug with attribute selectors containing single quotes.
367
16a88c9 @nex3 Don't bubble rulesets into @keyframes.
nex3 authored
368 * Don't put rulesets inside `@keyframes` directives when bubbling them up to the
369 top level.
370
a14866b @nex3 Don't emit busted property-less @keyframes rules.
nex3 authored
371 * Properly handle `@keyframes` rules that contain no properties.
372
a1e4fd4 @nex3 Handle --sourcemap=none when updating individual files.
nex3 authored
373 * Properly handle `--sourcemap=none` with `--update`.
374
9744829 @nex3 Don't notify when unwatched templates are deleted.
nex3 authored
375 * Silence "template deleted" notifications for templates that weren't being
376 watched.
377
510770f @nex3 Fix variable assignment semantics in top-level control structures.
nex3 authored
378 * Top-level control structures can assign to global variables without needing
379 `!global`. Variables first defined in these structures will still be local
380 without `!global`.
381
84e5525 @nex3 Bump VERSION to 3.4.0.
nex3 authored
382 ## 3.4.0 (18 August 2014)
e6f0edb @nex3 Revert "Remove support for script &."
nex3 authored
383
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
384 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.4.0).
385
e6f0edb @nex3 Revert "Remove support for script &."
nex3 authored
386 ### Using `&` in SassScript
387
388 For a long time, Sass has supported a special
389 {file:SASS_REFERENCE.md#parent-selector "parent selector", `&`}, which is used
390 when nesting selectors to describe how a nested selector relates to the
391 selectors above it. Until now, this has only been usable in selectors, but now
392 it can be used in SassScript as well.
393
394 In a SassScript expression, `&` refers to the current parent selector. It's a
395 comma-separated list of space-separated lists. For example:
396
397 .foo.bar .baz.bang, .bip.qux {
398 $selector: &;
399 }
400
401 The value of `$selector` is now `((".foo.bar" ".baz.bang"), ".bip.qux")`. The
402 compound selectors are quoted here to indicate that they're strings, but in
403 reality they would be unquoted.
404
405 If there is no parent selector, the value of `&` will be null. This means you
406 can use it in a mixin to detect whether a parent selector exists:
407
408 @mixin does-parent-exist {
409 @if & {
410 &:hover {
411 color: red;
412 }
467bd89 @chriseppstein Fix typo
chriseppstein authored
413 } @else {
e6f0edb @nex3 Revert "Remove support for script &."
nex3 authored
414 a {
415 color: red;
416 }
417 }
418 }
419
f701698 @nex3 Add a CHANGELOG entry about selector functions.
nex3 authored
420 ### Selector Functions
421
422 Complementing the ability to use `&` in SassScript, there's a new suite of
423 functions that use Sass's powerful `@extend` infrastructure to allow users to
424 manipulate selectors. These functions take selectors in the fully-parsed format
425 returned by `&`, plain strings, or anything in between. Those that return
426 selectors return them in the same format as `&`.
427
428 * The {Sass::Script::Functions#selector_nest `selector-nest($selectors...)`
429 function} nests each selector within one another just like they would be
430 nested in the stylesheet if you wrote them separated by spaces. For example,
431 `selector-nest(".foo, .bar", ".baz")` returns `.foo .baz, .bar .baz` (well,
432 technically `(("foo" ".baz") (".bar" ".baz"))`).
433
434 * The {Sass::Script::Functions#selector_append `selector-append($selectors...)`
435 function} concatenates each selector without a space. It handles selectors
436 with commas gracefully, so it's safer than just concatenating the selectors
437 using `#{}`. For example, `selector-append(".foo, .bar", "-suffix")` returns
438 `.foo-suffix, .bar-suffix`.
439
440 * The {Sass::Script::Functions#selector_extend `selector-extend($selector,
441 $extendee, $extender)` function} works just like `@extend`. It adds new
442 selectors to `$selector` as though you'd written `$extender { @extend
443 $extendee; }`.
444
445 * The {Sass::Script::Functions#selector_replace `selector-replace($selector,
446 $original, $replacement)` function} replaces all instances of `$original` in
447 `$selector` with `$replacement`. It uses the same logic as `@extend`, so you
448 can replace complex selectors with confidence.
449
450 * The {Sass::Script::Functions#selector_unify `selector-unify($selector1,
451 $selector2)` function} returns a selector that matches only elements matched
452 by both `$selector1` and `$selector2`.
453
454 * The {Sass::Script::Functions#is_superselector `is-superselector($super, $sub)`
455 function} returns whether or not `$super` matches a superset of the elements
456 `$sub` matches.
457
458 * The {Sass::Script::Functions#simple_selectors `simple-selectors($selector)`
459 function} takes only a selector with no commas or spaces (that is, a [compound
460 selector](http://dev.w3.org/csswg/selectors4/#structure)). It returns the list
461 of simple selectors that make up that compound selector.
462
463 * The {Sass::Script::Functions#selector_parse `selector-parse($selector)`
464 function} takes a selector in any format accepted by selector functions and
465 returns it in the same format returned by `&`. It's useful for getting a
466 selector into a consistent format before manually manipulating its contents.
467
468 One of the most straightforward applications of selector functions and `&` is
469 adding multiple suffixes to the same parent selector. For example:
470
471 .list {
472 @at-root #{selector-append(&, "--big", &, "--active")} {
473 color: red;
474 }
475 }
476
4e9d149 @nex3 Add support for all the Values and Units level 3 units.
nex3 authored
477 ### Smaller Improvements
478
4da1c1a @nex3 Enable sourcemaps by default.
nex3 authored
479 * Sourcemaps are now generated by default when using the `sass` or `scss`
480 executables and when using Sass as a plugin. This can be disabled by passing
481 `--sourcemap=none` on the command line or setting the `:sourcemap` option to
482 `:none` in Ruby.
483
484 * If a relative URI from a sourcemap to a Sass file can't be generated, it will
485 now fall back to using an absolute "file:" URI. In addition,
486 `--sourcemap=file` can be passed on the command line to force all URIs to Sass
487 files to be absolute.
488
dd48bb9 @nex3 Support --sourcemap=inline for sourcesContent source maps.
nex3 authored
489 * To guarantee that a sourcemap will be portable, `--sourcemap=inline` can be
490 passed to include the full source text in the sourcemap. Note that this can
491 cause very large sourcemaps to be generated for large projects.
492
2a69d19 @nex3 Add a changelog entry.
nex3 authored
493 * `@extend` can now extend selectors within selector pseudoclasses such as
494 `:not` and `:matches`. This also means that placeholder selectors can be used
3bd7fc0 @nex3 Add several features detectable via feature-exists.
nex3 authored
495 within selector pseudoclasses. This behavior can be detected using
496 `feature-exists(extend-selector-pseudoclass)`.
2a69d19 @nex3 Add a changelog entry.
nex3 authored
497
f7d1439 @nex3 Add an @error directive.
nex3 authored
498 * Sass now supports an `@error` directive that prints a message as a fatal
499 error. This is useful for user-defined mixins and functions that want to
082c26b @nex3 Add a feature-exists feature for @error.
nex3 authored
500 validate arguments and throw useful errors for unexpected conditions. Support
501 for this directive can be detected using `feature-exists(at-error)`.
f7d1439 @nex3 Add an @error directive.
nex3 authored
502
b80a77a @nex3 Add a CHANGELOG entry for color representation preservation.
nex3 authored
503 * When using colors in SassScript, the original representation of the color will
504 be preserved wherever possible. If you write `#f00`, it will be rendered as
505 `#f00`, not as `red` or `#ff0000`. In compressed mode, Sass will continue to
506 choose the most compact possible representation for colors.
507
4e9d149 @nex3 Add support for all the Values and Units level 3 units.
nex3 authored
508 * Add support for unit arithmetic with many more units, including angles, times,
3bd7fc0 @nex3 Add several features detectable via feature-exists.
nex3 authored
509 frequencies, and resolutions. This behavior can be detected using
510 `feature-exists(units-level-3)`.
4e9d149 @nex3 Add support for all the Values and Units level 3 units.
nex3 authored
511
2b87b83 @nex3 Update encoding support to match the Syntax Level 3 spec.
nex3 authored
512 * Sass now follows the [CSS Syntax Level 3][encodings level 3]
513 specification for determining a stylesheet's encoding. In addition,
ef0a258 @alanhogan Correct changelog typo: “not only” → “now only”
alanhogan authored
514 it now only emits UTF-8 CSS rather than trying to match the source
2b87b83 @nex3 Update encoding support to match the Syntax Level 3 spec.
nex3 authored
515 encoding.
516
517 [encodings level 3]: http://www.w3.org/TR/2013/WD-css-syntax-3-20130919/#determine-the-fallback-encoding
518
ac554ff @nex3 Support scientific notation and identifier units in numbers.
nex3 authored
519 * Sass now allows numbers to be written using scientific notation. It will not
520 emit numbers in scientific notation until it's more widely supported in
521 browsers.
522
523 * Sass now allows almost any identifier to be used as a custom numeric unit.
524 Identifiers that are ambiguous with subtraction, such as `px-1px`, are
525 disallowed.
526
6434174 @nex3 Support ids in SassScript.
nex3 authored
527 * Sass now supports using ids as values in SassScript as defined in the CSS
528 Basic User Interface Module. They're treated as unquoted strings.
529
c24ed3c @nex3 Follow the CSS spec when parsing strings.
nex3 authored
530 * SassScript strings and `@import` directives now support the full CSS string
531 grammar. This includes handling escape codes and ignoring backslashes followed
532 by newlines.
533
f2946e1 @nex3 Support writing CSS exception information when not using --watch.
nex3 authored
534 * When the `sass` and `scss` executables encounter an error, they will now
535 produce a CSS file describing that error. Previously this was enabled only for
536 `--watch` and `--update` mode; now it's enabled whenever a CSS file is being
537 written to disk.
538
6c1613a @nex3 Add a changelog entry for command-line option changes.
nex3 authored
539 * The command-line `--help` documentation for the `sass`, `scss`, and
540 `sass-convert` executables is revised and re-organized.
541
c02feeb @nex3 Add a changelog entry and some more docs for the new map-remove.
nex3 authored
542 * The `map-remove` function now allows multiple map keys to be removed at once.
543
3db2df6 @nex3 Add a CHANGELOG entry for rebeccapurple.
nex3 authored
544 * The new `rebeccapurple` color is now supported.
545
100e4e8 @nex3 Clamp arguments to rgb/rgba/hsl/hsla.
nex3 authored
546 * The `rgb()`, `rgba()`, `hsl()`, and `hsla()` functions now follow the CSS spec
547 by clamping their arguments to the valid ranges rather than emitting an error.
548 Sass-specific color functions still throw errors for out-of-range values.
549
3fa938e @nex3 Add a CHANGELOG entry.
nex3 authored
550 * Sass will now emit a warning when a named color is used directly in
551 interpolation (`#{}`) in a context where the hex representation would likely
552 be invalid. This should help users avoid having their stylesheets break in
553 compressed output mode.
57c47ce @nex3 Avoid emitting newlines for bubbled media queries in compressed mode.
nex3 authored
554
555 * Fix a bug where some `@media` queries would be followed by newlines in
556 compressed mode.
557
85c7160 @nex3 Add a changelog entry about index() returning null.
nex3 authored
558 ### Backwards Incompatibilities -- Must Read!
559
2283d29 @nex3 Rip out the deprecated addition of . to the load path.
nex3 authored
560 * The current working directory will no longer be placed onto the Sass load path
561 by default. If you need the current working directory to be available,
562 set `SASS_PATH=.` in your shell's environment.
563
f16ef47 @nex3 Rip out support for passing lists of pairs to map functions.
nex3 authored
564 * Sass will now throw an error when a list of pairs is passed to a map function.
565
f2e6e22 @nex3 Rip out deprecated argument names.
nex3 authored
566 * `mix()`'s deprecated argument names, `$color-1` and `$color-2`, will now throw
567 errors. Use `$color1` and `$color2` instead.
568
569 * `comparable()`'s deprecated argument names, `$number-1` and `$number-2`, will
570 now throw errors. Use `$number1` and `$number2` instead.
571
572 * `percentage()`'s, `round()`'s, `ceil()`'s, `floor()`'s, and `abs()`'s
573 deprecated argument name, `$value`, will now throw an error. Use `$number`
574 instead.
575
85c7160 @nex3 Add a changelog entry about index() returning null.
nex3 authored
576 * `index()` now returns `null` rather than `false` if the value isn't found in
577 the list.
578
f0698e1 @nex3 Make local variables shadow globals by default.
nex3 authored
579 * All variable assignments not at the top level of the document are now local by
580 default. If there's a global variable with the same name, it won't be
581 overwritten unless the `!global` flag is used. For example, `$var: value
3bd7fc0 @nex3 Add several features detectable via feature-exists.
nex3 authored
582 !global` will assign to `$var` globally. This behavior can be detected using
583 `feature-exists(global-variable-shadowing)`.
f0698e1 @nex3 Make local variables shadow globals by default.
nex3 authored
584
e8b1fb7 @nex3 Deprecate rather than disallow raw newlines in strings.
nex3 authored
585 * Unescaped newlines in SassScript strings in SCSS are deprecated, since they're
586 invalid according to the CSS string grammar. To include a newline in a string,
587 use "\a" or "\a " as in CSS.
c24ed3c @nex3 Follow the CSS spec when parsing strings.
nex3 authored
588
fe6b984 @nex3 Deprecate the subject selector operator.
nex3 authored
589 * The subject selector operator, `!`, is deprecated and will produce a warning
590 if used. The `:has()` selector should be used instead.
591
e4fc7f6 @nex3 Propagate quote-removal down through interpolated structures.
nex3 authored
592 * Quoted strings in lists will now be unquoted when those lists are interpolated
593 in anything else. This makes it much easier to add user-defined strings to
594 selector lists returned by `&`. This is unlikely to be behavior anyone's
595 relying on and would be difficult to deprecate gracefully, so there will be no
596 deprecation period for this change.
597
86e991a @nex3 Bump VERSION to 3.3.14.
nex3 authored
598 ## 3.3.14 (1 August 2014)
071b4b5 @nex3 Fix special function parsing.
nex3 authored
599
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
600 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.3.14).
601
071b4b5 @nex3 Fix special function parsing.
nex3 authored
602 * Improved edge-case parsing of special-syntax functions like `calc()` and
603 `expression()`.
604
f3d2dbd @nex3 Fix --update with absolute Windows paths.
nex3 authored
605 * Fixed a bug when using `--update` with absolute paths on Windows.
606
bfb8d0d @chriseppstein Version 3.3.13
chriseppstein authored
607 ## 3.3.13 (31 July 2014)
608
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
609 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.3.13).
610
bfb8d0d @chriseppstein Version 3.3.13
chriseppstein authored
611 * Fixed a bug on ruby 2.0 where watching several folders was broken.
612 Work around for a [bug in listen](https://github.com/guard/listen/issues/243).
613
bccfc70 @chriseppstein 3.3.12
chriseppstein authored
614 ## 3.3.12 (29 July 2014)
e5c73b0 @chriseppstein CHANGELOG updates for sass compiler improvements.
chriseppstein authored
615
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
616 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.3.12).
617
e5c73b0 @chriseppstein CHANGELOG updates for sass compiler improvements.
chriseppstein authored
618 * The Sass::Compiler class has a number of new minor features to support
6210346 @chriseppstein Merge remote-tracking branch 'nex3/stable' into stable
chriseppstein authored
619 Compass's compilation needs:
e5c73b0 @chriseppstein CHANGELOG updates for sass compiler improvements.
chriseppstein authored
620
621 * The template_deleted event of the Sass Compiler class now runs before the
622 side-effect events.
623 * The Sass Compiler class can now be used to clean output files.
624 * The Sass Compiler class now exposes an updating_stylesheets callback
625 that runs before stylesheets are mass-updated.
626 * The Sass Compiler class now exposes a the compilation_starting callback
627 that runs before an individual stylesheet is compiled.
628 * The Sass Compiler class now runs the updated_stylesheets callback
629 after stylesheets are mass-updated.
630 * The Sass Compiler can now be made to skip the initial update
631 when watching.
632
7389dba @nex3 Bump VERSION to 3.3.11.
nex3 authored
633 ## 3.3.11 (25 July 2014)
74e8157 @nex3 Correctly handle 0 in str-slice.
nex3 authored
634
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
635 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.3.11).
636
74e8157 @nex3 Correctly handle 0 in str-slice.
nex3 authored
637 * `str-slice()` now correctly returns an empty string when `$end-at` is 0.
638
0592350 @nex3 Bump VERSION to 3.3.10
nex3 authored
639 ## 3.3.10 (11 July 2014)
adc12b9 @nex3 Properly URL-encode URLs in sourcemaps.
nex3 authored
640
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
641 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.3.10).
642
adc12b9 @nex3 Properly URL-encode URLs in sourcemaps.
nex3 authored
643 * Properly encode URLs in sourcemaps.
644
9202b95 @nex3 Bump VERSION to 3.3.9.
nex3 authored
645 ## 3.3.9 (27 June 2014)
9e58d2e @nex3 Disallow functions named "and", "or", or "not".
nex3 authored
646
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
647 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.3.9).
648
9e58d2e @nex3 Disallow functions named "and", "or", or "not".
nex3 authored
649 * Defining a function named "and", "or", or "not" is now an error at
650 definition-time. This isn't considered a backwards-incompatible change because
651 although these functions could be defined previously, they could never be
652 successfully invoked.
653
21366e5 @nex3 Add a changelog entry for File.exists?
nex3 authored
654 * Fix deprecation warnings for using `File.exists?` on recent Ruby versions.
655
1f4c5a2 @nex3 Properly check nesting within @at-root.
nex3 authored
656 * Fix a bug where `@extend` within `@at-root` could crash the compiler.
657
759090a @nex3 Don't crash if we get an Errno::EPERM when chmodding.
nex3 authored
658 * Gracefully handle the inability to change cache files' permissions.
659
a2fd37e @nex3 Bump VERSION to 3.3.8.
nex3 authored
660 ## 3.3.8 (20 May 2014)
b5c2c53 @nex3 Don't split a block with @at-root unless necessary.
nex3 authored
661
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
662 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.3.8).
663
b5c2c53 @nex3 Don't split a block with @at-root unless necessary.
nex3 authored
664 * When a use of `@at-root` doesn't add any new rules, it will no longer split
665 its containing block in two ([issue 1239][]).
666
1675d67 @nex3 Fix a sass-convert comma-folding bug.
nex3 authored
667 * Fix a `sass-convert` bug where rules would occasionally be folded together
668 incorrectly when converting from CSS to Sass.
669
274cd1b @nex3 Fix @media interpolation errors.
nex3 authored
670 * Fix error messages for dynamically-generated `@media` queries with empty
671 queries.
672
b5c2c53 @nex3 Don't split a block with @at-root unless necessary.
nex3 authored
673 [issue 1239]: https://github.com/nex3/sass/issues/1239
674
03fe0c9 @nex3 Bump VERSION to 3.3.7.
nex3 authored
675 ## 3.3.7 (2 May 2014)
1059b98 @nex3 Properly set default options in Rails 3.0.
nex3 authored
676
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
677 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.3.7).
678
1059b98 @nex3 Properly set default options in Rails 3.0.
nex3 authored
679 * Properly set the default `Sass::Plugin` options in Rails 3.0.
680
2833775 @nex3 Add a changelog entry.
nex3 authored
681 * Fix a few cases where source ranges were being computed incorrectly for
682 SassScript expressions.
683
4e1d0ce @nex3 Bump VERSION to 3.3.6.
nex3 authored
684 ## 3.3.6 (25 April 2014)
d45d0d2 @nex3 Respect CSS "/" in Number#inspect.
nex3 authored
685
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
686 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.3.6).
687
d45d0d2 @nex3 Respect CSS "/" in Number#inspect.
nex3 authored
688 * The `inspect()` function will only interpret `/` between numbers as division
689 under the same circumstances that it would be interpreted as division when
690 used in a property.
691
fd0718d @nex3 Fix another comment-parsing bug.
nex3 authored
692 * Fix several cases where parsing pathological comments would cause Sass to take
fb36e65 @nex3 Fix a comment-parsing bug.
nex3 authored
693 exponential time and consume all available CPU.
694
48f303d @nex3 Bump VERSION to 3.3.5.
nex3 authored
695 ## 3.3.5 (14 April 2014)
66f4e76 @nex3 Bundle a fork of listen that falls back to polling.
nex3 authored
696
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
697 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.3.5).
698
66f4e76 @nex3 Bundle a fork of listen that falls back to polling.
nex3 authored
699 * Fix `LoadError`s when using `--watch` with the bundled version of Listen.
700
0cc2437 @nex3 Properly parse negative numbers preceded by a comment.
nex3 authored
701 * Properly parse negative numbers preceded by a comment.
702
dafaa32 @nex3 Avoid unnecessary interpolation in `sass-convert`.
nex3 authored
703 * Avoid unnecessary interpolation when running `sass-convert` on media queries.
704
ded47cb @nex3 Add a changelog entry.
nex3 authored
705 * Avoid freezing Ruby's `true` or `false` values.
706
e267c43 @nex3 Bump VERSION to 3.3.4.
nex3 authored
707 ## 3.3.4 (21 March 2014)
b5e20db @nex3 Improve the warning message for index(...) == false.
nex3 authored
708
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
709 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.3.4).
710
b5e20db @nex3 Improve the warning message for index(...) == false.
nex3 authored
711 * Improve the warning message for `index(...) == false`.
712
e72c6d7 @nex3 Fix the use of unknown directives within @at-root.
nex3 authored
713 * Fix the use of directives like `@font-face` within `@at-root`.
714
9b10d43 @nex3 Fix a Windows path canonicalization bug.
nex3 authored
715 * Fix a `sass --watch` issue on Windows where too many files would be updated
716 on every change.
717
63bc4a2 @nex3 Add a changelog entry for freezing nil.
nex3 authored
718 * Avoid freezing Ruby's `nil` value.
719
274bebd @nex3 Bump VERSION to 3.3.3.
nex3 authored
720 ## 3.3.3 (14 March 2014)
4fefedb @nex3 Add a changelog entry for the marshaling fix.
nex3 authored
721
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
722 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.3.3).
723
4fefedb @nex3 Add a changelog entry for the marshaling fix.
nex3 authored
724 * Fix a bug in Sass that was causing caching errors when unserializable objects
725 were in the Ruby options hash. Note that these errors may persist when using
726 Sass with Sprockets until the Sprockets importer is made serializable.
727
827e186 @nex3 Bump VERSION to 3.3.2.
nex3 authored
728 ## 3.3.2 (11 March 2014)
fedf159 @nex3 Fix a Listen loading bug.
nex3 authored
729
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
730 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.3.2).
731
fedf159 @nex3 Fix a Listen loading bug.
nex3 authored
732 * Fix a bug with loading the bundled version of Listen.
733
bd070e2 @nex3 Bump VERSION to 3.3.1.
nex3 authored
734 ## 3.3.1 (10 March 2014)
c6ebdfd @nex3 Add changelog entries.
nex3 authored
735
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
736 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.3.1).
737
c6ebdfd @nex3 Add changelog entries.
nex3 authored
738 This release includes a number of fixes for issues that popped up in the
739 immediate aftermath of the 3.3.0 release.
740
741 ### Re-bundle [listen](http://github.com/guard/listen)
742
743 With 3.3.0, we un-bundled the listen library from Sass. We did so hoping that it
744 would make it easier for users to keep up to date with the latest features and
745 bug fixes, but unfortunately listen 2.0 and on have dropped support for Ruby
746 1.8.7, which Sass continues to support. Further complicating things, RubyGems
747 lacks the ability to install only the version of listen supported by the current
748 Ruby installation, so we were unable to use a standard Gem dependency on listen.
749
750 To work around this, we tried to piggyback on RubyGems' native extension support
751 to install the correct version of listen when Sass was installed. This is what
752 we released in 3.3.0. However, this caused numerous problems in practice,
753 especially for users on Windows. It quickly became clear that this wasn't a
754 viable long-term solution.
755
756 As such, we're going back to the bundling strategy. While not perfect, this
757 worked well enough for the duration of the Sass 3.2 release, and we expect it to
758 cause much less havoc than un-bundling. We'll bundle listen 1.3.1, the most
759 recent version that retains Ruby 1.8.7 compatibility. If a user of Sass has a
760 more recent version of listen installed, that will be preferred to the bundled
761 version. Listen versions through 2.7.0 have been tested, and we expect the code
762 to work without modification on versions up to 3.0.0, assuming no major API
763 changes.
764
765 ### Smaller Changes
766
767 * Fixed a small interface incompatibility with listen 2.7.0.
768
769 * Fix some corner cases of path handling on Windows.
770
771 * Avoid errors when trying to watch read-only directories using listen 1.x.
772
bd8d8db @nex3 Bump VERSION to 3.3.0.
nex3 authored
773 ## 3.3.0 (7 March 2014)
d19e769 @nex3 Consider files with the same name to be an error.
nex3 authored
774
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
775 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.3.0).
776
442bef5 @nex3 Add a changelog entry about maps and @each.
nex3 authored
777 ### SassScript Maps
778
779 SassScript has a new data type: maps. These are associations from SassScript
780 values (often strings, but potentially any value) to other SassScript values.
781 They look like this:
782
783 $map: (key1: value1, key2: value2, key3: value3);
784
785 Unlike lists, maps must always be surrounded by parentheses. `()` is now an
786 empty map in addition to an empty list.
787
788 Maps will allow users to collect values into named groups and access those
789 groups dynamically. For example, you could use them to manage themes for your
790 stylesheet:
791
792 $themes: (
793 mist: (
794 header: #DCFAC0,
795 text: #00968B,
796 border: #85C79C
797 ),
798 spring: (
799 header: #F4FAC7,
800 text: #C2454E,
801 border: #FFB158
802 ),
803 // ...
804 );
805
806 @mixin themed-header($theme-name) {
807 h1 {
808 color: map-get(map-get($themes, $theme-name), header);
809 }
810 }
811
812 There are a variety of functions for working with maps:
813
814 * The {Sass::Script::Functions#map_get `map-get($map, $key)` function} returns
815 the value in the map associated with the given key. If no value is found, it
816 returns `null`.
817
818 * The {Sass::Script::Functions#map_merge `map-merge($map1, $map2)` function}
819 merges two maps together into a new map. If there are any conflicts, the
820 second map takes precedence, making this a good way to modify values in a map
821 as well.
822
f5b5409 @nex3 Add a map-remove() function for removing keys from a map.
nex3 authored
823 * The {Sass::Script::Functions#map_remove `map-remove($map, $key)` function}
824 returns a new map with a key removed.
825
442bef5 @nex3 Add a changelog entry about maps and @each.
nex3 authored
826 * The {Sass::Script::Functions#map_keys `map-keys($map)` function} returns all
827 the keys in a map as a comma-separated list.
828
829 * The {Sass::Script::Functions#map_values `map-values($map)` function} returns
830 all the values in a map as a comma-separated list.
831
832 * The {Sass::Script::Functions#map_has_key `map-has-key($map, $key)` function}
833 returns whether or not a map contains a pair with the given key.
834
835 All the existing list functions also work on maps, treating them as lists of
836 pairs. For example, `nth((foo: 1, bar: 2), 1)` returns `foo 1`. Maps can also be
837 used with `@each`, using the new multiple assignment feature (see below):
838
839 @each $header, $size in (h1: 2em, h2: 1.5em, h3: 1.2em) {
840 #{$header} {
841 font-size: $size;
842 }
843 }
844
845 Produces:
846
847 h1 {
848 font-size: 2em;
849 }
850
851 h2 {
852 font-size: 1.5em;
853 }
854
855 h3 {
856 font-size: 1.2em;
857 }
858
a900629 @nex3 Add changelog and reference documentation about variable argument maps.
nex3 authored
859 #### Variable Keyword Arguments
860
861 Maps can be passed as variable arguments, just like lists. For example, if
862 `$map` is `(alpha: -10%, "blue": 30%)`, you can write `scale-color($color,
863 $map...)` and it will do the same thing as `scale-color($color, $alpha: -10%,
864 $blue: 30%)`. To pass a variable argument list and map at the same time, just do
865 the list first, then the map, as in `fn($list..., $map...)`.
866
867 You can also access the keywords passed to a function that accepts a variable
868 argument list using the new {Sass::Script::Functions#keywords `keywords($args)`
869 function}. For example:
870
871 @function create-map($args...) {
872 @return keywords($args);
873 }
874
875 create-map($foo: 10, $bar: 11); // returns (foo: 10, bar: 11)
876
877 #### Lists of Pairs as Maps
878
5eed7dd @nex3 Allow lists of pairs to be passed to map functions.
nex3 authored
879 The new map functions work on lists of pairs as well, for the time being. This
880 feature exists to help libraries that previously used lists of pairs to simulate
881 maps. These libraries can now use map functions internally without introducing
882 backwards-incompatibility. For example:
883
884 $themes: (
885 mist (
886 header #DCFAC0,
887 text #00968B,
888 border #85C79C
889 ),
890 spring (
891 header #F4FAC7,
892 text #C2454E,
893 border #FFB158
894 ),
895 // ...
896 );
897
898 @mixin themed-header($theme-name) {
899 h1 {
900 color: map-get(map-get($themes, $theme-name), header);
901 }
902 }
903
904 Since it's just a migration feature, using lists of pairs in place of maps is
905 already deprecated. Library authors should encourage their users to use actual
906 maps instead.
907
267aa0d @nex3 Re-organize the changelog.
nex3 authored
908 ### Source Maps
909
910 Sass now has the ability to generate standard JSON [source maps][] of a format
911 that will soon be supported in most major browsers. These source maps tell the
912 browser how to find the Sass styles that caused each CSS style to be generated.
913 They're much more fine-grained than the old Sass-specific debug info that was
914 generated; rather than providing the source location of entire CSS rules at a
915 time, source maps provide the source location of each individual selector and
916 property.
917
918 Source maps can be generated by passing the `--sourcemap` flag to the `sass`
919 executable, by passing the {file:SASS_REFERENCE.md#sourcemap-option `:sourcemap`
920 option} to \{Sass::Plugin}, or by using the
921 \{Sass::Engine#render\_with\_sourcemap} method. By default, Sass assumes that
922 the source stylesheets will be made available on whatever server you're using,
923 and that their relative location will be the same as it is on the local
924 filesystem. If this isn't the case, you'll need to make a custom class that
925 extends \{Sass::Importers::Base} or \{Sass::Importers::Filesystem} and overrides
926 \{Sass::Importers::Base#public\_url `#public_url`}.
927
928 Thanks to Alexander Pavlov for implementing this.
929
930 [source maps]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?hl=en_US&pli=1&pli=1
931
932 #### `@at-root`
933
934 Sass 3.3 adds the `@at-root` directive, which is a way to tell Sass to
935 put a collection of rules at the top-level root of the document. The
936 easiest way to use it is with a selector:
937
938 .badge {
939 @at-root .info { ... }
940 @at-root .header { ... }
941 }
942
943 In addition to using `@at-root` on a single selector, you can also use it on a
944 whole block of them. For example:
945
946 .badge {
947 @at-root {
948 .info { ... }
949 .header { ... }
950 }
951 }
952
953 Also produces:
954
955 .info { ... }
956 .header { ... }
957
958 #### `@at-root (without: ...)` and `@at-root (with: ...)`
959
960 By default, `@at-root` just excludes selectors. However, it's also
961 possible to use `@at-root` to move outside of nested directives such
962 as `@media` as well. For example:
963
964 @media print {
965 .page {
966 width: 8in;
967 @at-root (without: media) {
968 color: red;
969 }
970 }
971 }
972
973 produces:
974
975 @media print {
976 .page {
977 width: 8in;
978 }
979 }
980 .page {
981 color: red;
982 }
983
984 You can use `@at-root (without: ...)` to move outside of any
985 directive. You can also do it with multiple directives separated by a
986 space: `@at-root (without: media supports)` moves outside of both
987 `@media` and `@supports` queries.
988
989 There are two special values you can pass to `@at-root`. "rule" refers
990 to normal CSS rules; `@at-root (without: rule)` is the same as
991 `@at-root` with no query. `@at-root (without: all)` means that the
992 styles should be moved outside of *all* directives and CSS rules.
993
994 If you want to specify which directives or rules to include, rather
995 than listing which ones should be excluded, you can use `with` instead
996 of `without`. For example, `@at-root (with: rule)` will move outside
997 of all directives, but will preserve any CSS rules.
998
bf5b30f @nex3 Add documentation for source maps.
nex3 authored
999 ### Smaller Improvements
1000
3f1498a @nex3 Support &-suffix.
nex3 authored
1001 * The parent selector, `&`, can be used with an identifier suffix. For
1002 example, `&-suffix` and `&_suffix` are now legal. The suffix will be
1003 added to the end of the parent selector, and will throw an error if
1004 this isn't possible. `&` must still appear at the beginning of a
1005 compound selector -- that is, `.foo-&` is still illegal.
1006
a81052e @nex3 Add an extension script to install listen along with Sass.
nex3 authored
1007 * [listen](http://github.com/guard/listen) is no longer bundled with
1008 Sass, nor is it a standard RubyGems dependency. Instead, it's
1009 automatically installed along with Sass in order to ensure that the
1010 user ends up with a version of Listen that works with their local
1011 Ruby version.
1db7476 @nex3 Various small tweaks.
nex3 authored
1012
1013 * Sass now has numerous functions for working with strings:
1014 \{Sass::Script::Functions#str_length `str-length`} will return the length of a
1015 string; \{Sass::Script::Functions#str_insert `str-insert`} will insert one
1016 string into another; \{Sass::Script::Functions#str_index `str-index`} will
1017 return the index of a substring within another string;
1018 \{Sass::Script::Functions#str_slice `str-slice`} will slice a substring from a
1019 string; \{Sass::Script::Functions#to_upper_case `to-upper-case`} will
1020 transform a string to upper case characters; and
1021 \{Sass::Script::Functions#to_lower_case `to-lower-case`} will transform a
1022 string to lower case characters.
1023
6a11a37 @nex3 Add a changelog entry for list-separator.
nex3 authored
1024 * A \{Sass::Script::Functions#list_separator `list-separator`} function has been
1025 added to determine what separator a list uses. Thanks to [Sam
1026 Richard](https://github.com/Snugug).
1027
1db7476 @nex3 Various small tweaks.
nex3 authored
1028 * Custom Ruby functions can now access the global environment, which
1029 allows them the same power as Sass-based functions with respect to
1030 reading and setting variables defined elsewhere in the stylesheet.
1031
f890339 @chriseppstein Set the nth element in a list.
chriseppstein authored
1032 * The `set-nth($list, $n, $value)` function lets you construct a new
1033 list based on `$list`, with the nth element changed to the value
1034 specified.
1035
054b486 @nex3 Allow mixin recursion.
nex3 authored
1036 * In order to make it easier for mixins to process maps, they may now
1037 recursively call themselves and one another. It is no longer an
1038 error to have a mixin `@include` loop.
1039
0b86e2b @nex3 Support "transparent" as a color name.
nex3 authored
1040 * Add "grey" and "transparent" as recognized SassScript colors. Thanks to [Rob
54ea0d4 @robwierzbowski Add grey to the list of Sass Script colors.
robwierzbowski authored
1041 Wierzbowski](https://github.com/robwierzbowski).
1042
3815575 @chriseppstein Cleanup YARD documentation.
chriseppstein authored
1043 * Add a function \{Sass::Script::Functions#unique\_id `unique-id()`} that will
a4bb6c0 @nex3 Clean up f3be0f4 a little.
nex3 authored
1044 return a CSS identifier that is unique within the scope of a single CSS file.
f3be0f4 @chriseppstein Added Sass Function: unique-id()
chriseppstein authored
1045
2f83fec @ggilder Allow negative indices in `nth` list function
ggilder authored
1046 * Allow negative indices into lists when using `nth()`.
1047
e3f1f9c @chriseppstein Sass feature detection.
chriseppstein authored
1048 * You can now detect the presence of a Sass feature using the new function
0c5a551 @chriseppstein Rename sass-supports() to feature-exists().
chriseppstein authored
1049 `feature-exists($feature-name)`. There are no detectable features in this
3f4b81a @chriseppstein Don't have any known features in the 3.3 release.
chriseppstein authored
1050 release, this is provided so that subsequent releases can begin to
1b45a55 @chriseppstein Allow plugins to expose their features too.
chriseppstein authored
1051 use it. Additionally, plugins can now expose their functionality
0c5a551 @chriseppstein Rename sass-supports() to feature-exists().
chriseppstein authored
1052 through `feature-exists` by calling `Sass.add_feature(feature_name)`. Features
1b45a55 @chriseppstein Allow plugins to expose their features too.
chriseppstein authored
1053 exposed by plugins must begin with a dash to distinguish them from
1054 official features.
8738d59 @chriseppstein Sass function to test if a mixin exists.
chriseppstein authored
1055
1056 * It is now possible to determine the existence of different Sass
1057 constructs using these new functions:
1058
67af938 @chriseppstein Address code review comments
chriseppstein authored
1059 * `variable-exists($name)` checks if a variable resolves in the
8738d59 @chriseppstein Sass function to test if a mixin exists.
chriseppstein authored
1060 current scope.
67af938 @chriseppstein Address code review comments
chriseppstein authored
1061 * `global-variable-exists($name)` checks if a global variable of the
8738d59 @chriseppstein Sass function to test if a mixin exists.
chriseppstein authored
1062 given name exists.
67af938 @chriseppstein Address code review comments
chriseppstein authored
1063 * `function-exists($name)` checks if a function exists.
1064 * `mixin-exists($name)` checks if a mixin exists.
e3f1f9c @chriseppstein Sass feature detection.
chriseppstein authored
1065
7cd4753 @nex3 Allow function calls via a script expression.
nex3 authored
1066 * You can call a function by name by passing the function name to the
2376ba9 @nex3 Small changelog copy edit.
nex3 authored
1067 call function. For example, `call(nth, a b c, 2)` returns `b`.
7cd4753 @nex3 Allow function calls via a script expression.
nex3 authored
1068
8c564fa @fblee Properly convert comments after selectors in the indented syntax.
fblee authored
1069 * Comments following selectors in the indented syntax will be correctly
1070 converted using `sass-convert`.
1071
442bef5 @nex3 Add a changelog entry about maps and @each.
nex3 authored
1072 * `@each` now supports "multiple assignment", which makes it easier to iterate
1073 over lists of lists. If you write `@each $var1, $var2, $var3 in a b c, d e f,
1074 g h i`, the elements of the sub-lists will be assigned individually to the
1075 variables. `$var1`, `$var2`, and `$var3` will be `a`, `b` and `c`; then `d`,
1076 `e`, and `f`; and then `g`, `h`, and `i`. For more information, see
1077 {file:SASS_REFERENCE.md#each-multi-assign the `@each` reference}.
1078
23d3440 @nex3 Move decrementing @for into the "smaller changes" changelog section.
nex3 authored
1079 * `@for` loops can now go downward as well as upward. For example,
1080 `@for $var from 5 through 1` will set `$var` to `5`, `4`, `3`, `2`,
1081 and `1`. Thanks to [Robin Roestenburg](http://twitter.com/robinroest).
1082
04fcd6b @chriseppstein CHANGLELOG entry for value helpers.
chriseppstein authored
1083 * There is a new {Sass::Script::Value::Helpers convenience API} for creating
1084 Sass values from within ruby extensions.
1085
da06d68 @chriseppstein Make the if() function work as expected.
chriseppstein authored
1086 * The `if()` function now only evaluates the argument corresponding to
1087 the value of the first argument.
1088
4d79f20 @nex3 Support trailing commas in lists and maps.
nex3 authored
1089 * Comma-separated lists may now have trailing commas (e.g. `1, 2,
1090 3,`). This also allows you to use a trailing comma to distinguish a
1091 list with a single element from that element itself -- for example,
1092 `(1,)` is explicitly a list containing the value `1`.
1093
b8f4bab @nex3 Bubble unknown nested directives.
nex3 authored
1094 * All directives that are nested in CSS rules or properties and that
1095 contain more CSS rules or properties are now bubbled up through
1096 their parent rules.
1097
c7e9d1e @nex3 Clean up random() and its tests and docs.
nex3 authored
1098 * A new `random()` function returns a random number.
1099
1100 * A new function inspect($value) is provided for debugging the current
1101 sass representation of a value.
a4bc2e7 @chriseppstein Update changelog.
chriseppstein authored
1102
625100d @nex3 Changelog cleanups.
nex3 authored
1103 * The `@debug` directive now automatically inspects sass objects that are not
a4bc2e7 @chriseppstein Update changelog.
chriseppstein authored
1104 strings.
1105
d9ff64e @nex3 Don't emit numbers in scientific notation.
nex3 authored
1106 * Numbers will no longer be emitted in scientific notation.
1107
e92c472 @nex3 Fix up the internal representation of indented-syntax silent comments.
nex3 authored
1108 * `sass-convert` will now correctly handle silent (`//`-style) comments
1109 contained within loud (`/* */`-style) comments.
1110
8030459 @nex3 Move the changelog entry for mod with units.
nex3 authored
1111 * Allow modulo arithmetic for numbers with compatible units. Thanks to
1112 [Isaac Devine](http://www.devinesystems.co.nz).
1113
43e8b37 @nex3 Preserve hyphens in keyword arguments to mixins in sass-convert.
nex3 authored
1114 * Keyword arguments to mixins and functions that contain hyphens will have the
1115 hyphens preserved when using `sass-convert`.
1116
d19e769 @nex3 Consider files with the same name to be an error.
nex3 authored
1117 ### Backwards Incompatibilities -- Must Read!
1118
c5e5500 @nex3 Disallow cross-directive @extends wholesale.
nex3 authored
1119 * Sass will now throw an error when `@extend` is used to extend a selector
1120 outside the `@media` context of the extending selector. This means the
1121 following will be an error:
1122
1123 @media screen {
1124 .foo { @extend .bar; }
1125 }
1126 .bar { color: blue; }
1127
6b1a36d @nex3 Throw an error for failing @extends.
nex3 authored
1128 * Sass will now throw an error when an `@extend` that has no effect is used. The
1129 `!optional` flag may be used to avoid this behavior for a single `@extend`.
1130
d19e769 @nex3 Consider files with the same name to be an error.
nex3 authored
1131 * Sass will now throw an error when it encounters a single `@import` statement
1132 that tries to import more than one file. For example, if you have `@import
1133 "screen"` and both `screen.scss` and `_screen.scss` exist, a warning will be
c5e5500 @nex3 Disallow cross-directive @extends wholesale.
nex3 authored
1134 printed.
d19e769 @nex3 Consider files with the same name to be an error.
nex3 authored
1135
1560055 @nex3 Add a changelog entry about the script refactor.
nex3 authored
1136 * `grey` and `transparent` are no longer interpreted as strings; they're now
1137 interpreted as colors, as per the CSS spec.
1138
76df5a0 @chriseppstein Deprecated: Current working directory on the load path automatically.
chriseppstein authored
1139 * The automatic placement of the current working directory onto the Sass
1140 load path is now deprecated as this causes unpredictable build
1141 processes. If you need the current working directory to be available,
a64a10d @chriseppstein It is SASS_PATH, not SASSPATH
chriseppstein authored
1142 set `SASS_PATH=.` in your shell's environment.
76df5a0 @chriseppstein Deprecated: Current working directory on the load path automatically.
chriseppstein authored
1143
b1d8381 @nex3 Remove on_updating_stylesheet.
nex3 authored
1144 * `Sass::Compiler.on_updating_stylesheet` has been removed.
1145
d00211c @nex3 Remove Sass::Plugin.options=.
nex3 authored
1146 * `Sass::Plugin.options=` has been removed.
1147
2da3d3b @nex3 Remove Sass::Script::Number::PRECISION.
nex3 authored
1148 * `Sass::Script::Number::PRECISION` has been removed.
1149
99f544a @chriseppstein Mention some internal code changes that could break sass plugins and …
chriseppstein authored
1150 * The methods in the `Sass::Util` module can no longer be used by
1151 including it. They must be invoked on the module itself for
1152 performance reasons.
1153
1154 * Sass values have always been immutable. The ruby object that backs
1155 each sass value is now "frozen" to prevent accidental modification and
1156 for performance.
1157
1560055 @nex3 Add a changelog entry about the script refactor.
nex3 authored
1158 * Many classes in the \{Sass::Script} have been rearranged. All the value
1159 classes have been moved into \{Sass::Script::Value} (e.g.
1160 \{Sass::Script::Value::Color}, \{Sass::Script::Value::String}, etc). Their
1161 base class is now \{Sass::Script::Value::Base} instead of
1162 `Sass::Script::Literal`. All the parse tree classes have been moved into
1163 \{Sass::Script::Tree} (e.g. \{Sass::Script::Tree::Node},
1164 \{Sass::Script::Tree::Operation}, etc).
1165
1166 The old names will continue to work for the next couple releases, but they
1167 will be removed eventually. Any code using them should upgrade to the new
1168 names.
54ea0d4 @robwierzbowski Add grey to the list of Sass Script colors.
robwierzbowski authored
1169
7cd0572 @nex3 Make the first step towards new variable semantics.
nex3 authored
1170 * As part of a migration to cleaner variable semantics, assigning to
1171 global variables in a local context by default is deprecated. If
1172 there's a global variable named `$color` and you write `$color:
1173 blue` within a CSS rule, Sass will now print a warning; in the
1174 future, it will create a new local variable named `$color`. You may
1175 now explicitly assign to global variables using the `!global` flag;
1176 for example, `$color: blue !global` will always assign to the global
1177 `$color` variable.
1178
8d3ff3f @nex3 Fix the parsing of hyphens with no surrounding whitespace.
nex3 authored
1179 * Two numbers separated by a hyphen with no whitespace will now be
1180 parsed as a subtraction operation rather than two numbers in a list.
1181 That is, `2px-1px` will parse the same as `2px - 1px` rather than
1182 `2px -1px`.
1183
6607785 @nex3 Make index() return a DeprecatedFalse object rather than null.
nex3 authored
1184 * `index()`'s `false` return value when a value isn't found is deprecated. In
1185 future Sass releases it will be `null` instead, so it should be used in ways
1186 that are compatible with both `false` and `null`.
79bad1f @nex3 Have index() return null instead of false.
nex3 authored
1187
605d56e @nex3 Merge remote-tracking branch 'JonathanTR/issue-833'
nex3 authored
1188 * `mix()`'s arguments are now `$color1` and `$color2` rather than
1189 `$color-1` and `$color-2`, in keeping with other functions.
1190
1191 * `comparable()`'s arguments are now `$number1` and `$number2` rather than
1192 `$number-1` and `$number-2`, in keeping with other functions.
1193
1194 * `percentage()`, `round()`, `ceil()`, `floor()`, and `abs()` now
1195 take arguments named '$number' instead of '$value'.
1196
607608a @chriseppstein Merge branch 'stable_3_2' into stable
chriseppstein authored
1197 ## 3.2.16 (17 March 2014)
0a70483 @chriseppstein Update changelog for race condition fix.
chriseppstein authored
1198
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
1199 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.2.16).
1200
0a70483 @chriseppstein Update changelog for race condition fix.
chriseppstein authored
1201 * Handle a race condition in the filesystem cache store when a cache
1202 entry becomes invalidated.
1203
00004e6 @nex3 Add dates to CHANGELOG release entries.
nex3 authored
1204 ## 3.2.15 (7 March 2014)
4cee8ac @nex3 Fix parent selector resolutions with newlines + commas.
nex3 authored
1205
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
1206 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.2.15).
1207
4cee8ac @nex3 Fix parent selector resolutions with newlines + commas.
nex3 authored
1208 * Support `&.foo` when the parent selector has a newline followed by a comma.
1209
00004e6 @nex3 Add dates to CHANGELOG release entries.
nex3 authored
1210 ## 3.2.14 (24 January 2014)
7272135 @nex3 Add a changelog entry for da0269e.
nex3 authored
1211
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
1212 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.2.14).
1213
7272135 @nex3 Add a changelog entry for da0269e.
nex3 authored
1214 * Don't crash when parsing a directive with no name in the indented syntax.
1215
53263e3 @nex3 Clean up file paths when importing.
nex3 authored
1216 * Clean up file paths when importing to avoid errors for overlong path
1217 names.
1218
439db92 @nex3 Allow functions named `true`, `false`, and `null`.
nex3 authored
1219 * Parse calls to functions named `true`, `false`, and `null` as function calls.
1220
18ed5bc @nex3 Be more conservative about moving @imports to the top.
nex3 authored
1221 * Don't move CSS `@import`s to the top of the file unless it's necessary.
1222
00004e6 @nex3 Add dates to CHANGELOG release entries.
nex3 authored
1223 ## 3.2.13 (19 December 2013)
d8ae9b1 @nex3 Always perform division on numbers returned by functions.
nex3 authored
1224
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
1225 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.2.13).
1226
d8ae9b1 @nex3 Always perform division on numbers returned by functions.
nex3 authored
1227 * Numbers returned by user-defined functions now trigger division, just like
1228 numbers stored in variables.
1229
59d3e9d @nex3 Properly escape file paths passed to Dir#[] in the FS importer.
nex3 authored
1230 * Support importing files in paths with open brackets.
1231
15e7a9e @nex3 Fix sass-convert with empty CSS rules.
nex3 authored
1232 * Fix `sass-convert`'s handling of rules with empty bodies when converting from
1233 CSS.
1234
a6f6bf5 @nex3 Fix CSS url("...") imports with media queries.
nex3 authored
1235 * Fix CSS imports using `url()` with a quoted string and media queries.
1236
00004e6 @nex3 Add dates to CHANGELOG release entries.
nex3 authored
1237 ## 3.2.12 (4 October 2013)
5976d19 @nex3 Add a CHANGELOG entry for the require "thread" change.
nex3 authored
1238
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
1239 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.2.12).
1240
5976d19 @nex3 Add a CHANGELOG entry for the require "thread" change.
nex3 authored
1241 * Add a couple missing `require`s, fixing some load errors, especially when
1242 using the command-line interface.
1243
1c7a50b @nex3 Be a little less aggressive about redundant selector elimination.
nex3 authored
1244 * Tune up some heuristics for eliminating redundant generated selectors. This
1245 will prevent some selector elimination in cases where multi-layered `@extend`
1246 is being used and where it seems intuitively like selectors shouldn't be
1247 eliminated.
1248
00004e6 @nex3 Add dates to CHANGELOG release entries.
nex3 authored
1249 ## 3.2.11 (27 September 2013)
004b1bd @nex3 Teach @extend that pseudo-elements don't work like pseudo-classes.
nex3 authored
1250
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
1251 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.2.11).
1252
004b1bd @nex3 Teach @extend that pseudo-elements don't work like pseudo-classes.
nex3 authored
1253 * Fix `@extend`'s semantics with respect to pseudo-elements. They are no longer
1254 treated identically to pseudo-classes.
5c60410 @chriseppstein Revert "Revert "Handle unary minus and plus in lists during convert.""
chriseppstein authored
1255
03af20f @chriseppstein CHANGELOG entry for issue #885's fix.
chriseppstein authored
1256 * A more understandable error is now provided when the `-E` option is
1257 passed to the Sass command line in ruby 1.8
004b1bd @nex3 Teach @extend that pseudo-elements don't work like pseudo-classes.
nex3 authored
1258
5c60410 @chriseppstein Revert "Revert "Handle unary minus and plus in lists during convert.""
chriseppstein authored
1259 * Fixed a bug in the output of lists containing unary plus or minus
1260 operations during sass <=> scss conversion.
1261
adf11a2 @mondoreale Avoid another CSS counters bug on IE7.
mondoreale authored
1262 * Avoid the [IE7 `content: counter` bug][cc bug] with `content: counters` as
1263 well.
1264
8f5d24c @nex3 Add a changelog entry about thread-safety fixes.
nex3 authored
1265 * Fix some thread-safety issues.
1266
00004e6 @nex3 Add dates to CHANGELOG release entries.
nex3 authored
1267 ## 3.2.10 (26 July 2013)
651c1da @nex3 Use sass_warn for @debug.
nex3 authored
1268
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
1269 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.2.10).
1270
651c1da @nex3 Use sass_warn for @debug.
nex3 authored
1271 * Use the Sass logger infrastructure for `@debug` directives.
1272
b575ad1 @nex3 Escape "*/" in full exceptions.
nex3 authored
1273 * When printing a Sass error into a CSS comment, escape `*/` so the comment
1274 doesn't end prematurely.
1275
0c52f5a @nex3 Preserve the bang in /*! comments.
nex3 authored
1276 * Preserve the `!` in `/*! ... */`-style comments.
1277
16eea67 @nex3 Fix an @extend trimming bug.
nex3 authored
1278 * Fix a bug where selectors were being incorrectly trimmed when using `@extend`.
1279
7842fc7 @ranvis Fix --unix-newlines/--in-place not working on Windows.
ranvis authored
1280 * Fix a bug where `sass --unix-newlines` and `sass-convert --in-place` are not
1281 working on Windows (thanks [SATO Kentaro](http://www.ranvis.com)).
1282
00004e6 @nex3 Add dates to CHANGELOG release entries.
nex3 authored
1283 ## 3.2.9 (10 May 2013)
5bc6769 @nex3 Fix a mutability bug.
nex3 authored
1284
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
1285 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.2.9).
1286
5bc6769 @nex3 Fix a mutability bug.
nex3 authored
1287 * Fix a bug where `@extend`s would occasionally cause a selector to be generated
1288 with the incorrect specificity.
1289
bea480b @nex3 Don't load guard/listen 1.0.
nex3 authored
1290 * Avoid loading [listen](http://github.com/guard/listen) v1.0, even if it's
1291 installed as a Gem (see [issue 719](https://github.com/nex3/sass/issues/719)).
1292
d7277c4 @nex3 Update the vendored listen to 0.7.3.
nex3 authored
1293 * Update the bundled version of [listen](http://github.com/guard/listen) to
1294 0.7.3.
1295
1556fe2 @nex3 Avoid IE7's content: counter bug.
nex3 authored
1296 * Automatically avoid the [IE7 `content: counter` bug][cc bug].
1297
1298 [cc bug]: http://jes.st/2013/ie7s-css-breaking-content-counter-bug/
1299
00004e6 @nex3 Add dates to CHANGELOG release entries.
nex3 authored
1300 ## 3.2.8 (22 April 2013)
5ce407b @nex3 Merge remote-tracking branch 'origin/stable' into stable
nex3 authored
1301
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
1302 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.2.8).
1303
5ce407b @nex3 Merge remote-tracking branch 'origin/stable' into stable
nex3 authored
1304 * Fix some edge cases where redundant selectors were emitted when using
1305 `@extend`.
1306
ff67c3d @nex3 Fix a list parsing bug.
nex3 authored
1307 * Fix a bug where comma-separated lists with interpolation could lose elements.
1308
5f4c6c9 @nex3 Fix a list conversion bug.
nex3 authored
1309 * Fix a bug in `sass-convert` where lists being passed as arguments to functions
1310 or mixins would lose their surrounding parentheses.
1311
9571704 @nex3 Fix conversion of null.
nex3 authored
1312 * Fix a bug in `sass-convert` where `null` wasn't being converted correctly.
1313
b2864aa @nex3 Fix a bug where multiple spaces in a string literal would sometimes b…
nex3 authored
1314 * Fix a bug where multiple spaces in a string literal would sometimes be folded
1315 together.
1316
a7bdf61 @nex3 Don't open a file for writing until we have something to write to it.
nex3 authored
1317 * `sass` and `sass-convert` won't create an empty file before writing to it.
1318 This fixes a flash of unstyled content when using LiveReload and similar
1319 tools.
1320
563158b @nex3 Fix an invalid mixin-loop report.
nex3 authored
1321 * Fix a case where a corrupted cache could produce fatal errors on some versions
1322 of Ruby.
1323
1324 * Fix a case where a mixin loop error would be incorrectly reported when using
1325 `@content`.
f7d8f35 @nex3 Always return nil in case of errors in cache store/retrieve.
nex3 authored
1326
00004e6 @nex3 Add dates to CHANGELOG release entries.
nex3 authored
1327 ## 3.2.7 (8 March 2013)
ba45f7b @nex3 Allow index() and zip() to take single-item lists.
nex3 authored
1328
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
1329 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.2.7).
1330
ba45f7b @nex3 Allow index() and zip() to take single-item lists.
nex3 authored
1331 * The \{Sass::Script::Functions#index `index`} and \{Sass::Script::Functions#zip
1332 `zip`} functions now work like all other list functions and treat individual
1333 values as single-element lists.
1334
0e6155f @nex3 Don't use recursion when parsing arglists.
nex3 authored
1335 * Avoid stack overflow errors caused by very long function or mixin argument
1336 lists.
1337
5ba41b6 @nex3 Emit relative paths when using --line-numbers.
nex3 authored
1338 * Emit relative paths when using the `--line-comments` flag of the `sass`
1339 executable.
1340
e7bd796 @nex3 Fix an exponential-parsing bug.
nex3 authored
1341 * Fix a case where very long numbers would cause the SCSS parser to
1342 take exponential time.
3700884 @nex3 Fix minimum-specificity calculation when trimming @extend output.
nex3 authored
1343
00004e6 @nex3 Add dates to CHANGELOG release entries.
nex3 authored
1344 ## 3.2.6 (22 February 2013)
381625b @nex3 Fix ArgumentError handling on Rubinius.
nex3 authored
1345
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
1346 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.2.6).
1347
0955e97 @nex3 Add a changelog entry about Rubinius stuff.
nex3 authored
1348 * Support for Rubinius 2.0.0.rc1. All tests pass in 1.8 mode. 1.9 mode has some
1349 tests blocked on [Rubinius issue
1350 2139](https://github.com/rubinius/rubinius/issues/2139).
381625b @nex3 Fix ArgumentError handling on Rubinius.
nex3 authored
1351
0e50859 @nex3 Support JRuby 1.7.
nex3 authored
1352 * Support for JRuby 1.7.2.
1353
75479e4 @nex3 Mention previous commit in the changelog.
nex3 authored
1354 * Support for symlinked executables. Thanks to [Yin-So
1355 Chen](http://yinsochen.com/).
1356
68d4805 @nex3 Bubble @supports in the indented syntax.
nex3 authored
1357 * Support for bubbling `@supports` queries in the indented syntax.
1358
fbcb3c5 @nex3 Fix @extend in nested @media queries.
nex3 authored
1359 * Fix an incorrect warning when using `@extend` from within nested `@media`
1360 queries.
1361
245bddf @nex3 Update listen to 0.7.2.
nex3 authored
1362 * Update the bundled version of [listen](http://github.com/guard/listen) to
1363 0.7.2.
1364
00004e6 @nex3 Add dates to CHANGELOG release entries.
nex3 authored
1365 ## 3.2.5 (4 January 2013)
88f1719 @nex3 Don't generate bogus @extend warnings.
nex3 authored
1366
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
1367 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.2.5).
1368
88f1719 @nex3 Don't generate bogus @extend warnings.
nex3 authored
1369 * Fix a bug where bogus `@extend` warnings were being generated.
1370
3ed77ef @dlmiles @import 'file' on windows fails with more than 1 subdir in the path
dlmiles authored
1371 * Fix an `@import` bug on Windows. Thanks to [Darryl
1372 Miles](https://github.com/dlmiles).
1373
d2d40ed @nex3 Add a changelog entry about Ruby 2.0.0 compatibility.
nex3 authored
1374 * Ruby 2.0.0-preview compatibility. Thanks to [Eric
1375 Saxby](http://www.livinginthepast.org/).
1376
ba7bd68 @nex3 Fix indented syntax line numbering with DOS lines.
nex3 authored
1377 * Fix incorrect line numbering when using DOS line endings with the indented
1378 syntax.
1379
00004e6 @nex3 Add dates to CHANGELOG release entries.
nex3 authored
1380 ## 3.2.4 (21 December 2012)
9c95538 @argv-minus-one Strip out './' when looking up relative @imports.
argv-minus-one authored
1381
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
1382 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.2.4).
1383
9c95538 @argv-minus-one Strip out './' when looking up relative @imports.
argv-minus-one authored
1384 * Fix imports from `.jar` files in JRuby. Thanks to [Alex
1385 Hvostov](https://github.com/argv-minus-one).
1386
e8c1147 @nex3 Support comments within @imports in SCSS.
nex3 authored
1387 * Allow comments within `@import` statements in SCSS.
1388
bfc4803 @nex3 Fix an exponential parsing bug.
nex3 authored
1389 * Fix a parsing performance bug where long decimals would occasionally take many
1390 minutes to parse.
1391
00004e6 @nex3 Add dates to CHANGELOG release entries.
nex3 authored
1392 ## 3.2.3 (9 November 2012)
7b9a61b @nex3 Fix sass --watch with deleted files.
nex3 authored
1393
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
1394 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.2.3).
1395
7b9a61b @nex3 Fix sass --watch with deleted files.
nex3 authored
1396 * `sass --watch` no longer crashs when a file in a watched directory is deleted.
1397
b5ff11c @nex3 Fix @extend in bubbling @media.
nex3 authored
1398 * Allow `@extend` within bubbling nodes such as `@media`.
1399
1029637 @nex3 Add a changelog entry about JRuby changes.
nex3 authored
1400 * Fix various JRuby incompatibilities and test failures.
1401
0ba3109 @nex3 Work around #495
nex3 authored
1402 * Work around a performance bug that arises from using `@extend` with
1403 deeply-nested selectors.
1404
00004e6 @nex3 Add dates to CHANGELOG release entries.
nex3 authored
1405 ## 3.2.2 (2 November 2012)
c1c50b7 @nex3 Add a `--poll` command-line flag to force a polling backend.
nex3 authored
1406
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
1407 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.2.2).
1408
c1c50b7 @nex3 Add a `--poll` command-line flag to force a polling backend.
nex3 authored
1409 * Add a `--poll` option to force `sass --watch` to use the polling backend to
1410 [Listen](https://github.com/guard/listen).
1411
26846f0 @nex3 Make sure @import errors have the correct line and file info.
nex3 authored
1412 * Fix some error reporting bugs related to `@import`.
1413
6b30c51 @nex3 Fix a CHANGELOG bug.
nex3 authored
1414 * Treat [protocol-relative URLs][pru] in `@import`s as static URLs, just like
3fc9279 @nex3 Support protocol-relative URLs.
nex3 authored
1415 `http` and `https` URLs.
1416
50a7b8c @nex3 Improve the error message for misplaced simple selectors.
nex3 authored
1417 * Improve the error message for misplaced simple selectors.
1418
1a2af8a @nex3 Fix an option-handling bug.
nex3 authored
1419 * Fix an option-handling bug that was causing errors with the Compass URL
1420 helpers.
1421
527e2f4 @nex3 Fix a Rails perf issue.
nex3 authored
1422 * Fix a performance issue with `@import` that only appears when
1423 ActiveSupport is loaded.
1424
3815575 @chriseppstein Cleanup YARD documentation.
chriseppstein authored
1425 * Fix flushing of actions to stdout. Thanks to
1426 [Russell Davis](http://github.com/russelldavis).
527e2f4 @nex3 Fix a Rails perf issue.
nex3 authored
1427
03be7d3 @nex3 Fix the examples for max().
nex3 authored
1428 * Fix the documentation for the `max()` function.
1429
47483ae @nex3 Fix a @media parsing bug.
nex3 authored
1430 * Fix a `@media` parsing bug.
1431
3fc9279 @nex3 Support protocol-relative URLs.
nex3 authored
1432 [pru]: http://paulirish.com/2010/the-protocol-relative-url/
1433
6cc0196 @nex3 Print a warning for ambiguous @imports.
nex3 authored
1434 ### Deprecations -- Must Read!
1435
1436 * Sass will now print a warning when it encounters a single `@import` statement
1437 that tries to import more than one file. For example, if you have `@import
1438 "screen"` and both `screen.scss` and `_screen.scss` exist, a warning will be
1439 printed. This will become an error in future versions of Sass.
1440
78c02f9 @nex3 Bump VERSION to 3.2.1.
nex3 authored
1441 ## 3.2.1 (15 August 2012)
3629c3b @nex3 Add a changelog entry now that the previous commit is confirmed to fi…
nex3 authored
1442
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
1443 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.2.1).
1444
3629c3b @nex3 Add a changelog entry now that the previous commit is confirmed to fi…
nex3 authored
1445 * Fix a buggy interaction with Pow and Capybara that caused `EOFError`s.
1446
40b3181 @nex3 Bump VERSION to 3.2.0.
nex3 authored
1447 ## 3.2.0 (10 August 2012)
7a31fea @nex3 Disallow `&foo` wholesale.
nex3 authored
1448
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
1449 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.2.0).
1450
911e3bc @nex3 Move the @content changelog docs into their own subsection.
nex3 authored
1451 ### `@content`
8ee5a8c @chriseppstein More docs on passing style blocks to mixins.
chriseppstein authored
1452
911e3bc @nex3 Move the @content changelog docs into their own subsection.
nex3 authored
1453 A mixin include can now accept a block of content ({file:SASS_REFERENCE.md#mixin-content Reference Documentation}).
1454 The style block will be passed to the mixin and can be placed at the point @content is used. E.g.:
a5746f3 Add Sass::Script::Functions#ie_hex_str.
Tom Miller authored
1455
911e3bc @nex3 Move the @content changelog docs into their own subsection.
nex3 authored
1456 @mixin iphone {
8ee5a8c @chriseppstein More docs on passing style blocks to mixins.
chriseppstein authored
1457 @media only screen and (max-width: 480px) {
911e3bc @nex3 Move the @content changelog docs into their own subsection.
nex3 authored
1458 @content;
8ee5a8c @chriseppstein More docs on passing style blocks to mixins.
chriseppstein authored
1459 }
911e3bc @nex3 Move the @content changelog docs into their own subsection.
nex3 authored
1460 }
a5746f3 Add Sass::Script::Functions#ie_hex_str.
Tom Miller authored
1461
911e3bc @nex3 Move the @content changelog docs into their own subsection.
nex3 authored
1462 @include iphone {
1463 body { color: red }
1464 }
1465
1466 Or in `.sass` syntax:
1467
1468 =iphone
1469 @media only screen and (max-width: 480px)
1470 @content
a5746f3 Add Sass::Script::Functions#ie_hex_str.
Tom Miller authored
1471
911e3bc @nex3 Move the @content changelog docs into their own subsection.
nex3 authored
1472 +iphone
1473 body
1474 color: red
1475
1476 Produces:
1477
1478 @media only screen and (max-width: 480px) {
1479 body { color: red }
1480 }
1481
1482 Note that the contents passed to the mixin are evaluated in the scope they are used,
1483 not the scope of the mixin. {file:SASS_REFERENCE.md#variable_scope_and_content_blocks More on variable scoping.}
7a31fea @nex3 Disallow `&foo` wholesale.
nex3 authored
1484
f1dc284 @nex3 Add changelog docs for placeholder selectors.
nex3 authored
1485 ### Placeholder Selectors: `%foo`
1486
1487 Sass supports a new, special type of selector called a "placeholder selector".
1488 These look like class and id selectors, except the `#` or `.` is replaced by `%`.
1489 They're meant to be used with the {file:SASS_REFERENCE.md#extend `@extend` directive},
1490 when you want to write styles to be extended
1491 but you don't want the base styles to appear in the CSS.
1492
1493 On its own, a placeholder selector just causes a ruleset not to be rendered.
1494 For example:
1495
1496 // This ruleset won't be rendered on its own.
1497 #context a%extreme {
1498 color: blue;
1499 font-weight: bold;
1500 font-size: 2em;
1501 }
1502
1503 However, placeholder selectors can be extended, just like classes and ids.
1504 The extended selectors will be generated, but the base placeholder selector will not.
1505 For example:
1506
1507 .notice { @extend %extreme; }
1508
1509 Is compiled to:
1510
1511 #context a.notice {
1512 color: blue;
1513 font-weight: bold;
1514 font-size: 2em;
1515 }
1516
d4e07b6 @nex3 Add a changelog entry for variable arguments.
nex3 authored
1517 ### Variable Arguments
1518
1519 Mixins and functions now both support variable arguments. When defining a mixin
1520 or function, you can add `...` after the final argument to have it accept an
1521 unbounded number of arguments and package them into a list. When calling a mixin
1522 or function, you can add `...` to expand the final argument (if it's a list) so
1523 that each value is passed as a separate argument. For example:
1524
1525 @mixin box-shadow($shadows...) {
1526 // $shadows is a list of all arguments passed to box-shadow
1527 -moz-box-shadow: $shadows;
1528 -webkit-box-shadow: $shadows;
1bde903 @amitsuroliya Correcting spell typos
amitsuroliya authored
1529 box-shadow: $shadows;
d4e07b6 @nex3 Add a changelog entry for variable arguments.
nex3 authored
1530 }
1531
1532 // This is the same as "@include spacing(1, 2, 3);"
1533 $values: 1, 2, 3;
1534 @include spacing($values...);
1535
1536 Finally, if a variable argument list is passed directly on to another mixin or
1537 function, it will also pass along any keyword arguments. This means that you can
1538 wrap a pre-existing mixin or function and add new functionality without changing
1539 the call signature.
1540
c56ecdb @nex3 Changelog entries.
nex3 authored
1541 ### Directive Interpolation
1542
1543 `#{}` interpolation is now allowed in all plain CSS directives
1544 (such as `@font-face`, `@keyframes`, and of course `@media`).
1545
1546 In addition, `@media` gets some special treatment.
1547 In addition to allowing `#{}` interpolation,
f19a88c @nex3 Disable "@media $var".
nex3 authored
1548 expressions may be used directly in media feature queries.
c56ecdb @nex3 Changelog entries.
nex3 authored
1549 This means that you can write e.g.:
1550
1551 $media: screen;
1552 $feature: -webkit-min-device-pixel-ratio;
1553 $value: 1.5;
1554
f19a88c @nex3 Disable "@media $var".
nex3 authored
1555 @media #{$media} and ($feature: $value) {
c56ecdb @nex3 Changelog entries.
nex3 authored
1556 ...
1557 }
1558
1559 This is intended to allow authors to easily write mixins
1560 that make use of `@media` and other directives dynamically.
1561
fe99497 @nex3 Restructure the changelog a little.
nex3 authored
1562 ### Smaller Improvements
516a0c5 @nex3 Support :any.
nex3 authored
1563
9b1820a @nex3 Allow mixins and functions to be defined in nested contexts.
nex3 authored
1564 * Mixins and functions may now be defined in a nested context, for example
1565 within `@media` rules. This also allows files containing them to be imported
1566 in such contexts.
1567
fe99497 @nex3 Restructure the changelog a little.
nex3 authored
1568 * Previously, only the `:-moz-any` selector was supported; this has been
1569 expanded to support any vendor prefix, as well as the plain `:any` selector.
516a0c5 @nex3 Support :any.
nex3 authored
1570
01d62fa @nex3 Mention CSS4 selector support in the changelog.
nex3 authored
1571 * All proposed [CSS4 selectors](http://dev.w3.org/csswg/selectors4/) are now
1572 supported, including reference selectors (e.g. `.foo /attr/ .bar`) and subject
1573 selectors (e.g. `.foo!`).
1574
fe99497 @nex3 Restructure the changelog a little.
nex3 authored
1575 * Sass now supports a global list of load paths, accessible via
1576 {Sass.load_paths}. This allows plugins and libraries to easily register their
1577 Sass files such that they're accessible to all {Sass::Engine} instances.
5c93cbf @nex3 Add Sass.load_paths.
nex3 authored
1578
83bc989 @piouPiouM Update SASS_CHANGELOG.md: missing space
piouPiouM authored
1579 * `Sass.load_paths` is initialized to the value of the `SASS_PATH` environment
fe99497 @nex3 Restructure the changelog a little.
nex3 authored
1580 variable. This variable should contain a colon-separated list of load paths
1581 (semicolon-separated on Windows).
5c93cbf @nex3 Add Sass.load_paths.
nex3 authored
1582
db51415 @nex3 Don't generate redundant selectors with multiple extends in an extender.
nex3 authored
1583 * In certain cases, redundant selectors used to be created as a result of a
1584 single rule having multiple `@extend`s. That redundancy has been eliminated.
1585
8f4869e @nex3 Eliminate more @extend output redundancy.
nex3 authored
1586 * Redundant selectors were also sometimes created by nested selectors
1587 using `@extend`. That redundancy has been eliminated as well.
1588
fe99497 @nex3 Restructure the changelog a little.
nex3 authored
1589 * There is now much more comprehensive support for using `@extend` alongside
1590 CSS3 selector combinators (`+`, `~`, and `>`). These combinators will now be
1591 merged as much as possible.
7e97574 @nex3 Support the SASS_PATH environment variable.
nex3 authored
1592
fe99497 @nex3 Restructure the changelog a little.
nex3 authored
1593 * The full set of [extended color keywords](http://www.w3.org/TR/css3-color/#svg-color)
1594 are now supported by Sass. They may be used to refer to color objects, and
1595 colors will render using those color names when appropriate.
7e97574 @nex3 Support the SASS_PATH environment variable.
nex3 authored
1596
fe99497 @nex3 Restructure the changelog a little.
nex3 authored
1597 * Sass 3.2 adds the \{Sass::Script::Functions#ie_hex_str `ie-hex-str`} function
1598 which returns a hex string for a color suitable for use with IE filters.
08a7399 @nex3 Some changes to ie-hex-str.
nex3 authored
1599
40099da @nex3 Add min and max functions.
nex3 authored
1600 * Sass 3.2 adds the \{Sass::Script::Functions#min `min`} and
1601 \{Sass::Script::Functions#max `max`} functions, which return the minimum and
1602 maximum of several values.
1603
6efc235 @nex3 Make keyword argument parsing stricter.
nex3 authored
1604 * Sass functions are now more strict about how keyword arguments can be passed.
1605
edc2634 @nex3 Add two more digits of decimal precision.
nex3 authored
1606 * Decimal numbers now default to five digits of precision after the decimal
1607 point.
1608
3815575 @chriseppstein Cleanup YARD documentation.
chriseppstein authored
1609 * The \{Sass::Script::Functions::EvaluationContext#options options hash}
e36aedc @nex3 Have EvaluationContext.options[:filename] give the current file.
nex3 authored
1610 available to Sass functions now contains the filename of the file that the
1611 function was executed in, rather than the top-level file.
1612
7a31fea @nex3 Disallow `&foo` wholesale.
nex3 authored
1613 ### Backwards Incompatibilities -- Must Read!
1614
1d77774 @nex3 Document @extend warnings.
nex3 authored
1615 #### `@extend` Warnings
1616
1617 Any `@extend` that doesn't match any selectors in the document will now print a
1618 warning. These warnings will become errors in future versions of Sass. This will
1619 help protect against typos and make it clearer why broken styles aren't working.
1620 For example:
1621
1622 h1.notice {color: red}
1623 a.important {@extend .notice}
1624
1625 This will print a warning, since the only use of `.notice` can't be merged with
1626 `a`.
1627
1628 You can declare that you don't want warnings for a specific `@extend` by using
1629 the `!optional` flag. For example:
1630
1631 h1.notice {color: red}
1632 a.important {@extend .notice !optional}
1633
1634 This will not print a warning.
1635
1636 #### Smaller Incompatibilities
1637
7a31fea @nex3 Disallow `&foo` wholesale.
nex3 authored
1638 * Parent selectors followed immediately by identifiers (e.g. `&foo`)
1639 are fully disallowed.
1640 They were deprecated in 3.1.8.
1641
870d200 @nex3 Get rid of //! and allow #{} in comments everywhere.
nex3 authored
1642 * `#{}` interpolation is now allowed in all comments.
1643
1644 * The `!` flag may not be used with `//` comments (e.g. `//!`).
1645
c56ecdb @nex3 Changelog entries.
nex3 authored
1646 * `#{}` interpolation is now disallowed in all `@import` statements
1647 except for those using `url()`.
1648
0db3cb6 @nex3 Disable less support for sass-convert.
nex3 authored
1649 * `sass-convert` no longer supports converting files from LessCSS.
1650
287abb9 @nex3 Bump VERSION to 3.1.21.
nex3 authored
1651 ## 3.1.21 (10 August 2012)
1dc0321 @nex3 Update vendor/listen.
nex3 authored
1652
1dd6504 @zessx Fix GitHub tag links, and add missing ones.
zessx authored
1653 [Tagged on GitHub](https://github.com/sass/sass/releases/tag/3.1.21).
1654
34059b2 @nex3 Preserve single-line comments in multi-line comments.
nex3 authored
1655 * Preserve single-line comments that are embedded within multi-line comments.
644da82 @nex3 Preserve newlines in nested selectors.
nex3 authored
1656 * Preserve newlines in nested selectors when those selectors are used multiple
1657 times in the same document.
4d615d6 @nex3 Don't die when running tests with LANG=.
nex3 authored