sass-embedded 1.56.2 → 1.58.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/lib/src/compile.js +43 -39
  2. package/dist/lib/src/compile.js.map +1 -1
  3. package/dist/lib/src/compiler-path.js +6 -6
  4. package/dist/lib/src/compiler-path.js.map +1 -1
  5. package/dist/lib/src/deprotofy-span.js +9 -18
  6. package/dist/lib/src/deprotofy-span.js.map +1 -1
  7. package/dist/lib/src/dispatcher.js +48 -48
  8. package/dist/lib/src/dispatcher.js.map +1 -1
  9. package/dist/lib/src/exception.js +4 -4
  10. package/dist/lib/src/exception.js.map +1 -1
  11. package/dist/lib/src/function-registry.js +24 -25
  12. package/dist/lib/src/function-registry.js.map +1 -1
  13. package/dist/lib/src/importer-registry.js +57 -64
  14. package/dist/lib/src/importer-registry.js.map +1 -1
  15. package/dist/lib/src/legacy/index.js +1 -1
  16. package/dist/lib/src/legacy/index.js.map +1 -1
  17. package/dist/lib/src/message-transformer.js +8 -81
  18. package/dist/lib/src/message-transformer.js.map +1 -1
  19. package/dist/lib/src/messages.js +6 -0
  20. package/dist/lib/src/messages.js.map +1 -0
  21. package/dist/lib/src/packet-transformer.js.map +1 -1
  22. package/dist/lib/src/protofier.js +99 -116
  23. package/dist/lib/src/protofier.js.map +1 -1
  24. package/dist/lib/src/sync-compiler.js +5 -2
  25. package/dist/lib/src/sync-compiler.js.map +1 -1
  26. package/dist/lib/src/utils.js +1 -1
  27. package/dist/lib/src/utils.js.map +1 -1
  28. package/dist/package.json +23 -24
  29. package/dist/tool/get-embedded-compiler.js +68 -0
  30. package/dist/tool/get-embedded-compiler.js.map +1 -0
  31. package/dist/tool/get-embedded-protocol.js +41 -0
  32. package/dist/tool/get-embedded-protocol.js.map +1 -0
  33. package/dist/tool/get-js-api.js +33 -0
  34. package/dist/tool/get-js-api.js.map +1 -0
  35. package/dist/tool/{prepare-dev-environment.js → init.js} +18 -38
  36. package/dist/tool/init.js.map +1 -0
  37. package/dist/tool/prepare-optional-release.js +94 -3
  38. package/dist/tool/prepare-optional-release.js.map +1 -1
  39. package/dist/tool/prepare-release.js +4 -4
  40. package/dist/tool/prepare-release.js.map +1 -1
  41. package/dist/tool/utils.js +6 -248
  42. package/dist/tool/utils.js.map +1 -1
  43. package/package.json +23 -24
  44. package/CHANGELOG.md +0 -2761
  45. package/dist/.gitignore +0 -18
  46. package/dist/lib/src/vendor/embedded-protocol/embedded_sass_pb.js +0 -9031
  47. package/dist/lib/src/vendor/embedded-protocol/embedded_sass_pb.js.map +0 -1
  48. package/dist/tool/prepare-dev-environment.js.map +0 -1
package/CHANGELOG.md DELETED
@@ -1,2761 +0,0 @@
1
- ## 1.56.2
2
-
3
- ### Embedded Sass
4
-
5
- * The embedded compiler now supports version 1.2.0 of [the embedded
6
- protocol](https://github.com/sass/embedded-protocol).
7
-
8
- ## 1.56.1
9
-
10
- ### Embedded Sass
11
-
12
- * Importer results now validate that `contents` is actually a string and whether
13
- `sourceMapUrl` is an absolute URL.
14
-
15
- ## 1.56.0
16
-
17
- * **Potentially breaking change:** To match the CSS spec, SassScript expressions
18
- beginning with `not` or `(` are no longer supported at the beginning of
19
- parenthesized sections of media queries. For example,
20
-
21
- ```scss
22
- @media (width >= 500px) and (not (grid))
23
- ```
24
-
25
- will now be emitted unchanged, instead of producing
26
-
27
- ```scss
28
- @media (width >= 500px) and (false)
29
- ```
30
-
31
- See [the Sass website](https://sass-lang.com/d/media-logic) for details.
32
-
33
- * **Potentially breaking bug fix:** Angle units like `rad` or `turn` are now
34
- properly converted to equivalent `deg` values for `hsl()`, `hsla()`,
35
- `adjust-hue()`, `color.adjust()`, and `color.change()`.
36
-
37
- See [the Sass website](https://sass-lang.com/d/function-units#hue) for
38
- details.
39
-
40
- * Fix indentation for selectors that span multiple lines in a `@media` query.
41
-
42
- * Emit a deprecation warning when passing `$alpha` values with units to
43
- `color.adjust()` or `color.change()`. This will be an error in Dart Sass
44
- 2.0.0.
45
-
46
- See [the Sass website](https://sass-lang.com/d/function-units#alpha) for
47
- details.
48
-
49
- * Emit a deprecation warning when passing a `$weight` value with no units or
50
- with units other than `%` to `color.mix()`. This will be an error in Dart Sass
51
- 2.0.0.
52
-
53
- See [the Sass website](https://sass-lang.com/d/function-units#weight) for
54
- details.
55
-
56
- * Emit a deprecation warning when passing `$n` values with units to `list.nth()`
57
- or `list.set-nth()`. This will be an error in Dart Sass 2.0.0.
58
-
59
- See [the Sass website](https://sass-lang.com/d/function-units#index) for
60
- details.
61
-
62
- * Improve existing deprecation warnings to wrap `/`-as-division suggestions in
63
- `calc()` expressions.
64
-
65
- * Properly mark the warning for passing numbers with units to `random()` as a
66
- deprecation warning.
67
-
68
- * Fix a bug where `@extend` could behave unpredicatably when used along with
69
- `meta.load-css()` and shared modules that contained no CSS themselves but
70
- loaded CSS from other modules.
71
-
72
- ### Dart API
73
-
74
- * Emit a deprecation warning when passing a `sassIndex` with units to
75
- `Value.sassIndexToListIndex()`. This will be an error in Dart Sass 2.0.0.
76
-
77
- ### JS API
78
-
79
- * Importer results now validate whether `contents` is actually a string type.
80
-
81
- * Importer result argument errors are now rendered correctly.
82
-
83
- ## 1.55.0
84
-
85
- * **Potentially breaking bug fix:** Sass numbers are now universally stored as
86
- 64-bit floating-point numbers, rather than sometimes being stored as integers.
87
- This will generally make arithmetic with very large numbers more reliable and
88
- more consistent across platforms, but it does mean that numbers between nine
89
- quadrillion and nine quintillion will no longer be represented with full
90
- accuracy when compiling Sass on the Dart VM.
91
-
92
- * **Potentially breaking bug fix:** Sass equality is now properly [transitive].
93
- Two numbers are now considered equal (after doing unit conversions) if they
94
- round to the same `1e-11`th. Previously, numbers were considered equal if they
95
- were within `1e-11` of one another, which led to some circumstances where `$a
96
- == $b` and `$b == $c` but `$a != $b`.
97
-
98
- [transitive]: https://en.wikipedia.org/wiki/Transitive_property
99
-
100
- * **Potentially breaking bug fix:** Various functions in `sass:math` no longer
101
- treat floating-point numbers that are very close (but not identical) to
102
- integers as integers. Instead, these functions now follow the floating-point
103
- specification exactly. For example, `math.pow(0.000000000001, -1)` now returns
104
- `1000000000000` instead of `Infinity`.
105
-
106
- * Emit a deprecation warning for `$a -$b` and `$a +$b`, since these look like
107
- they could be unary operations but they're actually parsed as binary
108
- operations. Either explicitly write `$a - $b` or `$a (-$b)`. See
109
- https://sass-lang.com/d/strict-unary for more details.
110
-
111
- ### Dart API
112
-
113
- * Add an optional `argumentName` parameter to `SassScriptException()` to make it
114
- easier to throw exceptions associated with particular argument names.
115
-
116
- * Most APIs that previously returned `num` now return `double`. All APIs
117
- continue to _accept_ `num`, although in Dart 2.0.0 these APIs will be changed
118
- to accept only `double`.
119
-
120
- ### JS API
121
-
122
- * Fix a bug in which certain warning spans would not have their properties
123
- accessible by the JS API.
124
-
125
- ## 1.54.9
126
-
127
- * Fix an incorrect span in certain `@media` query deprecation warnings.
128
-
129
- ## 1.54.8
130
-
131
- * No user-visible changes.
132
-
133
- ## 1.54.7
134
-
135
- * Add support for 32-bit ARM releases on Linux.
136
-
137
- ## 1.54.6
138
-
139
- * Fix a bug where a `@media` query could be incorrectly omitted from a
140
- stylesheet if it had multiple levels of nested `@media` queries within it
141
- *and* the inner queries were mergeable but the outer query was not.
142
-
143
- ## 1.54.5
144
-
145
- * Properly consider `a ~ c` to be a superselector of `a ~ b ~ c` and `a + b +
146
- c`.
147
-
148
- * Properly consider `b > c` to be a superselector of `a > b > c`, and similarly
149
- for other combinators.
150
-
151
- * Properly calculate specificity for selector pseudoclasses.
152
-
153
- * Deprecate use of `random()` when `$limit` has units to make it explicit that
154
- `random()` currently ignores units. A future version will no longer ignore
155
- units.
156
-
157
- * Don't throw an error when the same module is `@forward`ed multiple times
158
- through a configured module.
159
-
160
- ### Embedded Sass
161
-
162
- * Rather than downloading the embedded compiler for the local platform on
163
- install, the `sass-embedded` npm package now declares optional dependencies on
164
- platform-specific embedded compiler packages.
165
-
166
- ## 1.54.4
167
-
168
- * Improve error messages when passing incorrect units that are also
169
- out-of-bounds to various color functions.
170
-
171
- ## 1.54.3
172
-
173
- * Release a native ARM64 executable for Mac OS.
174
-
175
- ## 1.54.2
176
-
177
- * No user-visible changes.
178
-
179
- ## 1.54.1
180
-
181
- * When unifying selectors for `@extend` and `selector.unify()`, ensure that
182
- `:root`, `:scope`, `:host`, and `:host-context` only appear at the beginning
183
- of complex selectors.
184
-
185
- ## 1.54.0
186
-
187
- * Deprecate selectors with leading or trailing combinators, or with multiple
188
- combinators in a row. If they're included in style rules after nesting is
189
- resolved, Sass will now produce a deprecation warning and, in most cases, omit
190
- the selector. Leading and trailing combinators can still be freely used for
191
- nesting purposes.
192
-
193
- See https://sass-lang.com/d/bogus-combinators for more details.
194
-
195
- * Add partial support for new media query syntax from Media Queries Level 4. The
196
- only exception are logical operations nested within parentheses, as these were
197
- previously interpreted differently as SassScript expressions.
198
-
199
- A parenthesized media condition that begins with `not` or an opening
200
- parenthesis now produces a deprecation warning. In a future release, these
201
- will be interpreted as plain CSS instead.
202
-
203
- * Deprecate passing non-`deg` units to `color.hwb()`'s `$hue` argument.
204
-
205
- * Fix a number of bugs when determining whether selectors with pseudo-elements
206
- are superselectors.
207
-
208
- * Treat `*` as a superselector of all selectors.
209
-
210
- ### Dart API
211
-
212
- * Add a top-level `fakeFromImport()` function for testing custom importers
213
- that use `AsyncImporter.fromImport`.
214
-
215
- ### JS API
216
-
217
- * Add a `charset` option that controls whether or not Sass emits a
218
- `@charset`/BOM for non-ASCII stylesheets.
219
-
220
- * Fix Sass npm package types for TS 4.7+ Node16 and NodeNext module resolution.
221
-
222
- ## 1.53.0
223
-
224
- * Add support for calling `var()` with an empty second argument, such as
225
- `var(--side, )`.
226
-
227
- ### JS API
228
-
229
- * Fix a bug where `meta.load-css()` would sometimes resolve relative URLs
230
- incorrectly when called from a mixin using the legacy JS API.
231
-
232
- ### Embedded Sass
233
-
234
- * Respect npm's proxy settings when downloading the embedded Sass compiler.
235
-
236
- ## 1.52.3
237
-
238
- * Fix crash when trailing loud comments (`/* ... */`) appear twice in a row
239
- across two different imports which themselves imported the same file each.
240
-
241
- ## 1.52.2
242
-
243
- * Preserve location of trailing loud comments (`/* ... */`) instead of pushing
244
- the comment to the next line.
245
-
246
- ## 1.52.1
247
-
248
- ### Command Line Interface
249
-
250
- * Fix a bug where `--watch` mode would close immediately in TTY mode. This was
251
- caused by our change to close `--watch` when stdin was closed *outside of* TTY
252
- mode, which has been reverted for now while we work on a fix.
253
-
254
- ## 1.52.0
255
-
256
- * Add support for arbitrary modifiers at the end of plain CSS imports, in
257
- addition to the existing `supports()` and media queries. Sass now allows any
258
- sequence of identifiers of functions after the URL of an import for forwards
259
- compatibility with future additions to the CSS spec.
260
-
261
- * Fix an issue where source locations tracked through variable references could
262
- potentially become incorrect.
263
-
264
- * Fix a bug where a loud comment in the source can break the source map when
265
- embedding the sources, when using the command-line interface or the legacy JS
266
- API.
267
-
268
- ### JS API
269
-
270
- * `SassNumber.assertUnit()` and `SassNumber.assertNoUnits()` now correctly
271
- return the number called on when it passes the assertion.
272
-
273
- ## 1.51.0
274
-
275
- * **Potentially breaking change**: Change the order of maps returned by
276
- `map.deep-merge()` to match those returned by `map.merge()`. All keys that
277
- appeared in the first map will now be listed first in the same order they
278
- appeared in that map, followed by any new keys added from the second map.
279
-
280
- * Improve the string output of some AST nodes in error messages.
281
-
282
- ## 1.50.1
283
-
284
- ### Embedded Sass
285
-
286
- * The JS embedded host and the embedded compiler will now properly avoid
287
- resolving imports relative to the current working directory unless `'.'` is
288
- passed as a load path.
289
-
290
- * Fix a bug in the JS embedded host's implementation of the legacy JS API where
291
- imports that began with `/` could crash on Windows.
292
-
293
- ## 1.50.0
294
-
295
- * `@extend` now treats [`:where()`] the same as `:is()`.
296
-
297
- [`:where()`]: https://developer.mozilla.org/en-US/docs/Web/CSS/:where
298
-
299
- ### Command Line Interface
300
-
301
- * Closing the standard input stream will now cause the `--watch` command to stop
302
- running.
303
-
304
- ### Embedded Sass
305
-
306
- * Fix a bug where the JS embedded host crashed when invoking a legacy importer
307
- after resolving a relative filesystem import.
308
-
309
- * Improve error messages when returning non-`Object` values from legacy
310
- importers.
311
-
312
- ## 1.49.11
313
-
314
- * Add support for 64-bit ARM releases on Linux.
315
-
316
- ### Embedded Sass
317
-
318
- * The embedded compiler now correctly sets the `id` field for all
319
- `OutboundMessage`s.
320
-
321
- ## 1.49.10
322
-
323
- * Quiet deps mode now silences compiler warnings in mixins and functions that
324
- are defined in dependencies even if they're invoked from application
325
- stylesheets.
326
-
327
- * In expanded mode, Sass will now emit colors using `rgb()`, `rbga()`, `hsl()`,
328
- and `hsla()` function notation if they were defined using the corresponding
329
- notation. As per our browser support policy, this change was only done once
330
- 95% of browsers were confirmed to support this output format, and so is not
331
- considered a breaking change.
332
-
333
- Note that this output format is intended for human readability and not for
334
- interoperability with other tools. As always, Sass targets the CSS
335
- specification, and any tool that consumes Sass's output should parse all
336
- colors that are supported by the CSS spec.
337
-
338
- * Fix a bug in which a color written using the four- or eight-digit hex format
339
- could be emitted as a hex color rather than a format with higher browser
340
- compatibility.
341
-
342
- * Calculations are no longer simplified within supports declarations
343
-
344
- ## 1.49.9
345
-
346
- ### Embedded Sass
347
-
348
- * Fixed a bug where the legacy API could crash when passed an empty importer
349
- list.
350
-
351
- ## 1.49.8
352
-
353
- * Fixed a bug where some plain CSS imports would not be emitted.
354
-
355
- ### JS API
356
-
357
- * Fix a bug where inspecting the Sass module in the Node.js console crashed on
358
- Node 17.
359
-
360
- ### Embedded Sass
361
-
362
- * Fix a bug where source map URLs were incorrectly generated when passing
363
- importers to the legacy API.
364
-
365
- ## 1.49.7
366
-
367
- ### Embedded Sass
368
-
369
- * First stable release the `sass-embedded` npm package that contains the Node.js
370
- Embedded Host.
371
-
372
- * First stable release of the `sass_embedded` pub package that contains the
373
- Embedded Dart Sass compiler.
374
-
375
- ## 1.49.6
376
-
377
- * No user-visible changes.
378
-
379
- ## 1.49.5
380
-
381
- * No user-visible changes.
382
-
383
- ## 1.49.4
384
-
385
- * No user-visible changes.
386
-
387
- ## 1.49.3
388
-
389
- * No user-visible changes.
390
-
391
- ## 1.49.2
392
-
393
- * No user-visible changes.
394
-
395
- ## 1.49.1
396
-
397
- * Stop supporting non-LTS Node.js versions.
398
-
399
- ## 1.49.0
400
-
401
- * Fix a bug in `string.insert` with certain negative indices.
402
-
403
- ### JS API
404
-
405
- * Add support for the `sourceMapIncludeSources` option in the new JS API.
406
-
407
- #### TypeScript Declarations
408
-
409
- * Fix a bug where `LegacyPluginThis.options.linefeed` was typed to return
410
- abbreviations when it actually returned literal linefeed characters.
411
-
412
- ## 1.48.0
413
-
414
- ### JS API
415
-
416
- * **Potentially breaking bug fix:** Match the specification of the new JS API by
417
- setting `LegacyResult.map` to `undefined` rather than `null`.
418
-
419
- #### TypeScript Declarations
420
-
421
- * Add a declaration for the `NULL` constant.
422
-
423
- ## 1.47.0
424
-
425
- ### JS API
426
-
427
- #### TypeScript Declarations
428
-
429
- * Add declarations for the `TRUE` and `FALSE` constants.
430
-
431
- ## 1.46.0
432
-
433
- ### JS API
434
-
435
- * **Potentially breaking bug fix:** Match the specification of the new JS API by
436
- passing `undefined` rather than `null` to `Logger.warn()` for an unset `span`.
437
-
438
- #### TypeScript Declarations
439
-
440
- * Add a declaration for the `LegacyPluginThis.options.context` field.
441
-
442
- * Update the definition of `LegacyAsyncFunction` to include explicit definitions
443
- with zero through six arguments before the `done` parameter. This makes it
444
- possible for TypeScript users to pass in callbacks that take a specific number
445
- of arguments, rather than having to declare a callback that takes an arbitrary
446
- number.
447
-
448
- * Add a declaration for `types.Error`, a legacy API class that can be returned
449
- by asynchronous functions to signal asynchronous errors.
450
-
451
- * Add a `LegacyAsyncFunctionDone` type for the `done` callback that's passed to
452
- `LegacyAsyncFunction`.
453
-
454
- ## 1.45.2
455
-
456
- ### JS API
457
-
458
- * **Potentially breaking bug fix:** Change the default value of the `separator`
459
- parameter for `new SassArgumentList()` to `','` rather than `null`. This
460
- matches the API specification.
461
-
462
- ## 1.45.1
463
-
464
- * **Potentially breaking bug fix:** Properly parse custom properties in
465
- `@supports` conditions. Note that this means that SassScript expressions on
466
- the right-hand side of custom property `@supports` queries now need to be
467
- interpolated, as per https://sass-lang.com/d/css-vars.
468
-
469
- * **Potentially breaking bug fix:** Fix a bug where `inspect()` was not
470
- properly printing nested, empty, bracketed lists.
471
-
472
- ## 1.45.0
473
-
474
- ### JS API
475
-
476
- This release includes an entirely new JavaScript API, designed to be more
477
- idiomatic, performant, and usable. The old API will continue to be supported
478
- until Dart Sass 2.0.0, but it is now considered deprecated and should be avoided
479
- for new code.
480
-
481
- The new API includes:
482
-
483
- * `compile()` and `compileAsync()` functions that take Sass file paths and
484
- return the result of compiling them to CSS. The async function returns a
485
- `Promise` rather than using a callback-based API.
486
-
487
- * `compileString()` and `compileStringAsync()` functions that take a string of
488
- Sass source and compiles it to CSS. As above, the async function returns a
489
- `Promise`.
490
-
491
- * A new importer API that more closely matches the Sass specification's logic
492
- for resolving loads. This makes it much easier for Sass to cache information
493
- across `@import` and `@use` rules, which substantially improves performance
494
- for applications that rely heavily on repeated `@import`s.
495
-
496
- * A new custom function API, including much more usable JS representations of
497
- Sass value types complete with type-assertion functions, easy map and list
498
- lookups, and compatibility with the [`immutable`] package. **Unlike in the
499
- legacy API,** function callbacks now take one argument which contains an array
500
- of Sass values (rather than taking a separate JS argument for each Sass
501
- argument).
502
-
503
- [`immutable`]: https://immutable-js.com/
504
-
505
- For full documentation of this API, please see [the Sass website][js-api].
506
-
507
- [js-api]: https://sass-lang.com/documentation/js-api
508
-
509
- This release also adds TypeScript type definitions.
510
-
511
- ## 1.44.0
512
-
513
- * Suggest `calc()` as an alternative in `/`-as-division deprecation messages.
514
-
515
- ### Dart API
516
-
517
- * Add `SassNumber.convert()` and `SassNumber.convertValue()`. These work like
518
- `SassNumber.coerce()` and `SassNumber.coerceValue()`, except they don't treat
519
- unitless numbers as universally compatible.
520
-
521
- * Fix a bug where `SassNumber.coerceToMatch()` and
522
- `SassNumber.coerceValueToMatch()` wouldn't coerce single-unit numbers to
523
- match unitless numbers.
524
-
525
- ## 1.43.5
526
-
527
- * Fix a bug where calculations with different operators were incorrectly
528
- considered equal.
529
-
530
- * Properly parse attribute selectors with empty namespaces.
531
-
532
- ### JS API
533
-
534
- * Print more detailed JS stack traces. This is mostly useful for the Sass team's
535
- own debugging purposes.
536
-
537
- ## 1.43.4
538
-
539
- ### JS API
540
-
541
- * Fix a bug where the `logger` option was ignored for the `render()` function.
542
-
543
- ## 1.43.3
544
-
545
- * Improve performance.
546
-
547
- ## 1.43.2
548
-
549
- * Improve the error message when the default namespace of a `@use` rule is not
550
- a valid identifier.
551
-
552
- ## 1.43.1
553
-
554
- * No user-visible changes.
555
-
556
- ## 1.43.0
557
-
558
- ### JS API
559
-
560
- * Add support for the `logger` option. This takes an object that can define
561
- `warn` or `debug` methods to add custom handling for messages emitted by the
562
- Sass compiler. See [the JS API docs] for details.
563
-
564
- [the JS API docs]: https://sass-lang.com/documentation/js-api/interfaces/Logger
565
-
566
- * Add a `Logger.silent` object that can be passed to the `logger` option to
567
- silence all messages from the Sass compiler.
568
-
569
- ## 1.42.1
570
-
571
- * Fix a bug where Sass variables and function calls in calculations weren't
572
- being resolved correctly if there was a parenthesized interpolation elsewhere
573
- in the file.
574
-
575
- ## 1.42.0
576
-
577
- * `min()` and `max()` expressions are once again parsed as calculations as long
578
- as they contain only syntax that's allowed in calculation expressions. To
579
- avoid the backwards-compatibility issues that were present in 1.40.0, they now
580
- allow unitless numbers to be mixed with numbers with units just like the
581
- global `min()` and `max()` functions. Similarly, `+` and `-` operations within
582
- `min()` and `max()` functions allow unitless numbers to be mixed with numbers
583
- with units.
584
-
585
- ## 1.41.1
586
-
587
- * Preserve parentheses around `var()` functions in calculations, because they
588
- could potentially be replaced with sub-expressions that might need to be
589
- parenthesized.
590
-
591
- ## 1.41.0
592
-
593
- * Calculation values can now be combined with strings using the `+` operator.
594
- This was an error in 1.40.0, but this broke stylesheets that were relying on
595
- `$value + ""` expressions to generically convert values to strings. (Note that
596
- the Sass team recommends the use of `"#{$value}"` or `inspect($value)` for
597
- that use-case.)
598
-
599
- * The `selector.unify()` function now correctly returns `null` when one selector
600
- is a `:host` or `:host-context` and the other is a selector that's guaranteed
601
- to be within the current shadow DOM. The `@extend` logic has been updated
602
- accordingly as well.
603
-
604
- * Fix a bug where extra whitespace in `min()`, `max()`, `clamp()`, and `calc()`
605
- expressions could cause bogus parse errors.
606
-
607
- * Fix a bug where the right-hand operand of a `-` in a calculation could
608
- incorrectly be stripped of parentheses.
609
-
610
- ### Dart API
611
-
612
- * `SassCalculation.plus()` now allows `SassString` arguments.
613
-
614
- ## 1.40.1
615
-
616
- * **Potentially breaking bug fix:** `min()` and `max()` expressions outside of
617
- calculations now behave the same way they did in 1.39.2, returning unquoted
618
- strings if they contain no Sass-specific features and calling the global
619
- `min()` and `max()` functions otherwise. Within calculations, they continue to
620
- behave how they did in 1.40.0.
621
-
622
- This fixes an unintended breaking change added in 1.40.0, wherein passing a
623
- unitless number and a number without units to `min()` or `max()` now produces
624
- an error. Since this breakage affects a major Sass library, we're temporarily
625
- reverting support for `min()` and `max()` calculations while we work on
626
- designing a longer-term fix.
627
-
628
- ## 1.40.0
629
-
630
- * Add support for first-class `calc()` expressions (as well as `clamp()` and
631
- plain-CSS `min()` and `max()`). This means:
632
-
633
- * `calc()` expressions will be parsed more thoroughly, and errors will be
634
- highlighted where they weren't before. **This may break your stylesheets,**
635
- but only if they were already producing broken CSS.
636
-
637
- * `calc()` expressions will be simplified where possible, and may even return
638
- numbers if they can be simplified away entirely.
639
-
640
- * `calc()` expressions that can't be simplified to numbers return a new data
641
- type known as "calculations".
642
-
643
- * Sass variables and functions can now be used in `calc()` expressions.
644
-
645
- * New functions `meta.calc-name()` and `meta.calc-args()` can now inspect
646
- calculations.
647
-
648
- ### Dart API
649
-
650
- * Add a new value type, `SassCalculation`, that represents calculations.
651
-
652
- * Add new `CalculationOperation`, `CalculationOperator`, and
653
- `CalculationInterpolation` types to represent types of arguments that may
654
- exist as part of a calculation.
655
-
656
- * Add a new `Value.assertCalculation()` method.
657
-
658
- * Add a new `Number.hasCompatibleUnits()` method.
659
-
660
- ## 1.39.2
661
-
662
- * Fix a bug where configuring with `@use ... with` would throw an error when
663
- that variable was defined in a module that also contained `@forward ... with`.
664
-
665
- ## 1.39.1
666
-
667
- * Partial fix for a bug where `@at-root` does not work properly in nested
668
- imports that contain `@use` rules. If the only `@use` rules in the nested
669
- import are for built-in modules, `@at-root` should now work properly.
670
-
671
- ## 1.39.0
672
-
673
- ### JS API
674
-
675
- * Add a `charset` option that controls whether or not Sass emits a
676
- `@charset`/BOM for non-ASCII stylesheets.
677
-
678
- ## 1.38.2
679
-
680
- * No user-visible changes
681
-
682
- ## 1.38.1
683
-
684
- * No user-visible changes
685
-
686
- ## 1.38.0
687
-
688
- * In expanded mode, emit characters in Unicode private-use areas as escape
689
- sequences rather than literal characters.
690
-
691
- * Fix a bug where quotes would be omitted for an attribute selector whose value
692
- was a single backslash.
693
-
694
- * Properly consider numbers that begin with `.` as "plain CSS" for the purposes
695
- of parsing plain-CSS `min()` and `max()` functions.
696
-
697
- * Allow `if` to be used as an unquoted string.
698
-
699
- * Properly parse backslash escapes within `url()` expressions.
700
-
701
- * Fix a couple bugs where `@extend`s could be marked as unsatisfied when
702
- multiple identical `@extend`s extended selectors across `@use` rules.
703
-
704
- ### Command Line Interface
705
-
706
- * Strip CRLF newlines from snippets of the original stylesheet that are included
707
- in the output when an error occurs.
708
-
709
- ### JS API
710
-
711
- * Don't crash when a Windows path is returned by a custom Node importer at the
712
- same time as file contents.
713
-
714
- * Don't crash when an error occurs in a stylesheet loaded via a custom importer
715
- with a custom URL scheme.
716
-
717
- ### Dart API
718
-
719
- * Add a `SassArgumentList.keywordsWithoutMarking` getter to access the keyword
720
- arguments of an argument list without marking them accessed.
721
-
722
- ## 1.37.5
723
-
724
- * No user-visible changes.
725
-
726
- ## 1.37.4
727
-
728
- * No user-visible changes.
729
-
730
- ## 1.37.3
731
-
732
- * No user-visible changes.
733
-
734
- ## 1.37.2
735
-
736
- * No user-visible changes.
737
-
738
- ## 1.37.1
739
-
740
- * No user-visible changes.
741
-
742
- ## 1.37.0
743
-
744
- ### Dart API
745
-
746
- * **Potentially breaking bug fix:** `SassNumber.asSlash`,
747
- `SassNumber.withSlash()`, and `SassNumber.withoutSlash()` have been marked as
748
- `@internal`. They were never intended to be used outside the `sass` package.
749
-
750
- * **Potentially breaking bug fix:** `SassException` has been marked as `@sealed`
751
- to formally indicate that it's not intended to be extended outside of the
752
- `sass` package.
753
-
754
- * Add a `Value.withListContents()` method that returns a new Sass list with the
755
- same list separator and brackets as the current value, interpreted as a list.
756
-
757
- ## 1.36.0
758
-
759
- ### Dart API
760
-
761
- * Added `compileToResult()`, `compileStringToResult()`,
762
- `compileToResultAsync()`, and `compileStringToResultAsync()` methods. These
763
- are intended to replace the existing `compile*()` methods, which are now
764
- deprecated. Rather than returning a simple string, these return a
765
- `CompileResult` object, which will allow us to add additional information
766
- about the compilation without having to introduce further deprecations.
767
-
768
- * Instead of passing a `sourceMaps` callback to `compile*()`, pass
769
- `sourceMaps: true` to `compile*ToResult()` and access
770
- `CompileResult.sourceMap`.
771
-
772
- * The `CompileResult` object exposes a `loadedUrls` object which lists the
773
- canonical URLs accessed during a compilation. This information was
774
- previously unavailable except through the JS API.
775
-
776
- ## 1.35.2
777
-
778
- * **Potentially breaking bug fix**: Properly throw an error for Unicode ranges
779
- that have too many `?`s after hexadecimal digits, such as `U+12345??`.
780
-
781
- * **Potentially breaking bug fix:** Fixed a bug where certain local variable
782
- declarations nested within multiple `@if` statements would incorrectly
783
- override a global variable. It's unlikely that any real stylesheets were
784
- relying on this bug, but if so they can simply add `!global` to the variable
785
- declaration to preserve the old behavior.
786
-
787
- * **Potentially breaking bug fix:** Fix a bug where imports of root-relative
788
- URLs (those that begin with `/`) in `@import` rules would be passed to
789
- both Dart and JS importers as `file:` URLs.
790
-
791
- * Properly support selector lists for the `$extendee` argument to
792
- `selector.extend()` and `selector.replace()`.
793
-
794
- * Fix an edge case where `@extend` wouldn't affect a selector within a
795
- pseudo-selector such as `:is()` that itself extended other selectors.
796
-
797
- * Fix a race condition where `meta.load-css()` could trigger an internal error
798
- when running in asynchronous mode.
799
-
800
- ### Dart API
801
-
802
- * Use the `@internal` annotation to indicate which `Value` APIs are available
803
- for public use.
804
-
805
- ## 1.35.1
806
-
807
- * Fix a bug where the quiet dependency flag didn't silence warnings in some
808
- stylesheets loaded using `@import`.
809
-
810
- ## 1.35.0
811
-
812
- * Fix a couple bugs that could prevent some members from being found in certain
813
- files that use a mix of imports and the module system.
814
-
815
- * Fix incorrect recommendation for migrating division expressions that reference
816
- namespaced variables.
817
-
818
- ### JS API
819
-
820
- * Add a `quietDeps` option which silences compiler warnings from stylesheets
821
- loaded through importers and load paths.
822
-
823
- * Add a `verbose` option which causes the compiler to emit all deprecation
824
- warnings, not just 5 per feature.
825
-
826
- ## 1.34.1
827
-
828
- * Fix a bug where `--update` would always compile any file that depends on a
829
- built-in module.
830
-
831
- * Fix the URL for the `@-moz-document` deprecation message.
832
-
833
- * Fix a bug with `@for` loops nested inside property declarations.
834
-
835
- ## 1.34.0
836
-
837
- * Don't emit the same warning in the same location multiple times.
838
-
839
- * Cap deprecation warnings at 5 per feature by default.
840
-
841
- ### Command Line Interface
842
-
843
- * Add a `--quiet-deps` flag which silences compiler warnings from stylesheets
844
- loaded through `--load-path`s.
845
-
846
- * Add a `--verbose` flag which causes the compiler to emit all deprecation
847
- warnings, not just 5 per feature.
848
-
849
- ### Dart API
850
-
851
- * Add a `quietDeps` argument to `compile()`, `compileString()`,
852
- `compileAsync()`, and `compileStringAsync()` which silences compiler warnings
853
- from stylesheets loaded through importers, load paths, and `package:` URLs.
854
-
855
- * Add a `verbose` argument to `compile()`, `compileString()`, `compileAsync()`,
856
- and `compileStringAsync()` which causes the compiler to emit all deprecation
857
- warnings, not just 5 per feature.
858
-
859
- ## 1.33.0
860
-
861
- * Deprecate the use of `/` for division. The new `math.div()` function should be
862
- used instead. See [this page][] for details.
863
-
864
- [this page]: https://sass-lang.com/documentation/breaking-changes/slash-div
865
-
866
- * Add a `list.slash()` function that returns a slash-separated list.
867
-
868
- * **Potentially breaking bug fix:** The heuristics around when potentially
869
- slash-separated numbers are converted to slash-free numbers—for example, when
870
- `1/2` will be printed as `0.5` rather than `1/2`—have been slightly expanded.
871
- Previously, a number would be made slash-free if it was passed as an argument
872
- to a *user-defined function*, but not to a *built-in function*. Now it will be
873
- made slash-free in both cases. This is a behavioral change, but it's unlikely
874
- to affect any real-world stylesheets.
875
-
876
- * [`:is()`][] now behaves identically to `:matches()`.
877
-
878
- [`:is()`]: https://developer.mozilla.org/en-US/docs/Web/CSS/:is
879
-
880
- * Fix a bug where non-integer numbers that were very close to integer
881
- values would be incorrectly formatted in CSS.
882
-
883
- * Fix a bug where very small number and very large negative numbers would be
884
- incorrectly formatted in CSS.
885
-
886
- ### JS API
887
-
888
- * The `this` context for importers now has a `fromImport` field, which is `true`
889
- if the importer is being invoked from an `@import` and `false` otherwise.
890
- Importers should only use this to determine whether to load [import-only
891
- files].
892
-
893
- [import-only files]: https://sass-lang.com/documentation/at-rules/import#import-only-files
894
-
895
- ### Dart API
896
-
897
- * Add an `Importer.fromImport` getter, which is `true` if the current
898
- `Importer.canonicalize()` call comes from an `@import` rule and `false`
899
- otherwise. Importers should only use this to determine whether to load
900
- [import-only files].
901
-
902
- ## 1.32.13
903
-
904
- * **Potentially breaking bug fix:** Null values in `@use` and `@forward`
905
- configurations no longer override the `!default` variable, matching the
906
- behavior of the equivalent code using `@import`.
907
-
908
- * Use the proper parameter names in error messages about `string.slice`
909
-
910
- ## 1.32.12
911
-
912
- * Fix a bug that disallowed more than one module from extending the same
913
- selector from a module if that selector itself extended a selector from
914
- another upstream module.
915
-
916
- ## 1.32.11
917
-
918
- * Fix a bug where bogus indented syntax errors were reported for lines that
919
- contained only whitespace.
920
-
921
- ## 1.32.10
922
-
923
- * No user-visible changes.
924
-
925
- ## 1.32.9
926
-
927
- * Fix a typo in a deprecation warning.
928
-
929
- ### JavaScript API
930
-
931
- * Drop support for Chokidar 2.x. This version was incompatible with Node 14, but
932
- due to shortcomings in npm's version resolver sometimes still ended up
933
- installed anyway. Only declaring support for 3.0.0 should ensure compatibility
934
- going forward.
935
-
936
- ### Dart API
937
-
938
- * Allow the null safety release of args and watcher.
939
-
940
- ### Command Line Interface
941
-
942
- * Add a `-w` shorthand for the `--watch` flag.
943
-
944
- ## 1.32.8
945
-
946
- * Update chokidar version for Node API tests.
947
-
948
- ### JavaScript API
949
-
950
- * Allow a custom function to access the `render()` options object within its
951
- local context, as `this.options`.
952
-
953
- ## 1.32.7
954
-
955
- * Allow the null safety release of stream_transform.
956
-
957
- * Allow `@forward...with` to take arguments that have a `!default` flag without
958
- a trailing comma.
959
-
960
- * Improve the performance of unitless and single-unit numbers.
961
-
962
- ## 1.32.6
963
-
964
- ### Node JS API
965
-
966
- * Fix Electron support when `nodeIntegration` is disabled.
967
-
968
- ### Dart API
969
-
970
- * All range checks for `SassColor` constructors now throw `RangeError`s with
971
- `start` and `end` set.
972
-
973
- ## 1.32.5
974
-
975
- * **Potentially breaking bug fix:** When using `@for` with numbers that have
976
- units, the iteration variable now matches the unit of the initial number. This
977
- matches the behavior of Ruby Sass and LibSass.
978
-
979
- ### Node JS API
980
-
981
- * Fix a few infrequent errors when calling `render()` with `fiber` multiple
982
- times simultaneously.
983
-
984
- * Avoid possible mangled error messages when custom functions or importers throw
985
- unexpected exceptions.
986
-
987
- * Fix Electron support when `nodeIntegration` is disabled.
988
-
989
- ## 1.32.4
990
-
991
- * No user-visible changes.
992
-
993
- ## 1.32.3
994
-
995
- * Optimize `==` for numbers that have different units.
996
-
997
- ## 1.32.2
998
-
999
- * Print the actual number that was received in unit deprecation warnings for
1000
- color functions.
1001
-
1002
- ## 1.32.1
1003
-
1004
- * Don't emit permissions errors on Windows and OS X when trying to determine the
1005
- real case of path names.
1006
-
1007
- ## 1.32.0
1008
-
1009
- * Deprecate passing non-`%` numbers as lightness and saturation to `hsl()`,
1010
- `hsla()`, `color.adjust()`, and `color.change()`. This matches the CSS
1011
- specification, which also requires `%` for all lightness and saturation
1012
- parameters. See [the Sass website][color-units] for more details.
1013
-
1014
- * Deprecate passing numbers with units other than `deg` as the hue to `hsl()`,
1015
- `hsla()`, `adjust-hue()`, `color.adjust()`, and `color.change()`. Unitless
1016
- numbers *are* still allowed here, since they're allowed by CSS. See [the Sass
1017
- website][color-units] for more details.
1018
-
1019
- * Improve error messages about incompatible units.
1020
-
1021
- * Properly mark some warnings emitted by `sass:color` functions as deprecation
1022
- warnings.
1023
-
1024
- ### Dart API
1025
-
1026
- * Rename `SassNumber.valueInUnits()` to `SassNumber.coerceValue()`. The old name
1027
- remains, but is now deprecated.
1028
-
1029
- * Rename `SassNumber.coerceValueToUnit()`, a shorthand for
1030
- `SassNumber.coerceValue()` that takes a single numerator unit.
1031
-
1032
- * Add `SassNumber.coerceToMatch()` and `SassNumber.coerceValueToMatch()`, which
1033
- work like `SassNumber.coerce()` and `SassNumber.coerceValue()` but take a
1034
- `SassNumber` whose units should be matched rather than taking the units
1035
- explicitly. These generate better error messages than `SassNumber.coerce()`
1036
- and `SassNumber.coerceValue()`.
1037
-
1038
- * Add `SassNumber.convertToMatch()` and `SassNumber.convertValueToMatch()`,
1039
- which work like `SassNumber.coerceToMatch()` and
1040
- `SassNumber.coerceValueToMatch()` except they throw exceptions when converting
1041
- unitless values to or from units.
1042
-
1043
- * Add `SassNumber.compatibleWithUnit()`, which returns whether the number can be
1044
- coerced to a single numerator unit.
1045
-
1046
- ## 1.31.0
1047
-
1048
- * Add support for parsing `clamp()` as a special math function, the same way
1049
- `calc()` is parsed.
1050
-
1051
- * Properly load files in case-sensitive Windows directories with upper-case
1052
- names.
1053
-
1054
- ## 1.30.0
1055
-
1056
- * Fix a bug where `@at-root (without: all)` wouldn't properly remove a
1057
- `@keyframes` context when parsing selectors.
1058
-
1059
- ### Node JS API
1060
-
1061
- * The generated `main()` function in `sass.js` now returns a `Promise` that
1062
- completes when the executable is finished running.
1063
-
1064
- ### Dart API
1065
-
1066
- * Fix a bug that prevented importers from returning null when loading from a
1067
- URL that they had already canonicalized.
1068
-
1069
- ## 1.29.0
1070
-
1071
- * Support a broader syntax for `@supports` conditions, based on the latest
1072
- [Editor's Draft of CSS Conditional Rules 3]. Almost all syntax will be allowed
1073
- (with interpolation) in the conditions' parentheses, as well as function
1074
- syntax such as `@supports selector(...)`.
1075
-
1076
- [Editor's Draft of CSS Conditional Rules 3]: https://drafts.csswg.org/css-conditional-3/#at-supports
1077
-
1078
- ## 1.28.0
1079
-
1080
- * Add a [`color.hwb()`] function to `sass:color` that can express colors in [HWB] format.
1081
-
1082
- [`color.hwb()`]: https://sass-lang.com/documentation/modules/color#hwb
1083
- [HWB]: https://en.wikipedia.org/wiki/HWB_color_model
1084
-
1085
- * Add [`color.whiteness()`] and [`color.blackness()`] functions to `sass:color`
1086
- to get a color's [HWB] whiteness and blackness components.
1087
-
1088
- [`color.whiteness()`]: https://sass-lang.com/documentation/modules/color#whiteness
1089
- [`color.blackness()`]: https://sass-lang.com/documentation/modules/color#blackness
1090
-
1091
- * Add `$whiteness` and `$blackness` parameters to [`color.adjust()`],
1092
- [`color.change()`], and [`color.scale()`] to modify a color's [HWB] whiteness
1093
- and blackness components.
1094
-
1095
- [`color.adjust()`]: https://sass-lang.com/documentation/modules/color#adjust
1096
- [`color.change()`]: https://sass-lang.com/documentation/modules/color#change
1097
- [`color.scale()`]: https://sass-lang.com/documentation/modules/color#scale
1098
-
1099
- ### Dart API
1100
-
1101
- * Add [HWB] support to the `SassColor` class, including a `SassColor.hwb()`
1102
- constructor, `whiteness` and `blackness` getters, and a `changeHwb()` method.
1103
-
1104
- [HWB]: https://en.wikipedia.org/wiki/HWB_color_model
1105
-
1106
- ## 1.27.2
1107
-
1108
- * No user-visible changes.
1109
-
1110
- ## 1.27.1
1111
-
1112
- * **Potentially breaking bug fix:** `meta.load-css()` now correctly uses the
1113
- name `$url` for its first argument, rather than `$module`.
1114
-
1115
- * Don't crash when using `Infinity` or `NaN` as a key in a map.
1116
-
1117
- * Emit a proper parse error for a `=` with no right-hand side in a function.
1118
-
1119
- * Avoid going exponential on certain recursive `@extend` edge cases.
1120
-
1121
- ## 1.27.0
1122
-
1123
- * Adds an overload to `map.merge()` that supports merging a nested map.
1124
-
1125
- `map.merge($map1, $keys..., $map2)`: The `$keys` form a path to the nested map
1126
- in `$map1`, into which `$map2` gets merged.
1127
-
1128
- See [the Sass documentation][map-merge] for more details.
1129
-
1130
- [map-merge]: https://sass-lang.com/documentation/modules/map#merge
1131
-
1132
- * Adds an overloaded `map.set()` function.
1133
-
1134
- `map.set($map, $key, $value)`: Adds to or updates `$map` with the specified
1135
- `$key` and `$value`.
1136
-
1137
- `map.set($map, $keys..., $value)`: Adds to or updates a map that is nested
1138
- within `$map`. The `$keys` form a path to the nested map in `$map`, into
1139
- which `$value` is inserted.
1140
-
1141
- See [the Sass documentation][map-set] for more details.
1142
-
1143
- [map-set]: https://sass-lang.com/documentation/modules/map#set
1144
-
1145
- * Add support for nested maps to `map.get()`.
1146
- For example, `map.get((a: (b: (c: d))), a, b, c)` would return `d`.
1147
- See [the documentation][map-get] for more details.
1148
-
1149
- [map-get]: https://sass-lang.com/documentation/modules/map#get
1150
-
1151
- * Add support for nested maps in `map.has-key`.
1152
- For example, `map.has-key((a: (b: (c: d))), a, b, c)` would return true.
1153
- See [the documentation][map-has-key] for more details.
1154
-
1155
- [map-has-key]: https://sass-lang.com/documentation/modules/map#has-key
1156
-
1157
- * Add a `map.deep-merge()` function. This works like `map.merge()`, except that
1158
- nested map values are *also* recursively merged. For example:
1159
-
1160
- ```
1161
- map.deep-merge(
1162
- (color: (primary: red, secondary: blue),
1163
- (color: (secondary: teal)
1164
- ) // => (color: (primary: red, secondary: teal))
1165
- ```
1166
-
1167
- See [the Sass documentation][map-deep-merge] for more details.
1168
-
1169
- [map-deep-merge]: https://sass-lang.com/documentation/modules/map#deep-merge
1170
-
1171
- * Add a `map.deep-remove()` function. This allows you to remove keys from
1172
- nested maps by passing multiple keys. For example:
1173
-
1174
- ```
1175
- map.deep-remove(
1176
- (color: (primary: red, secondary: blue)),
1177
- color, primary
1178
- ) // => (color: (secondary: blue))
1179
- ```
1180
-
1181
- See [the Sass documentation][map-deep-remove] for more details.
1182
-
1183
- [map-deep-remove]: https://sass-lang.com/documentation/modules/map#deep-remove
1184
-
1185
- * Fix a bug where custom property values in plain CSS were being parsed as
1186
- normal property values.
1187
-
1188
- ### Dart API
1189
-
1190
- * Add a `Value.tryMap()` function which returns the `Value` as a `SassMap` if
1191
- it's a valid map, or `null` otherwise. This allows function authors to safely
1192
- retrieve maps even if they're internally stored as empty lists, without having
1193
- to catch exceptions from `Value.assertMap()`.
1194
-
1195
- ## 1.26.12
1196
-
1197
- * Fix a bug where nesting properties beneath a Sass-syntax custom property
1198
- (written as `#{--foo}: ...`) would crash.
1199
-
1200
- ## 1.26.11
1201
-
1202
- * **Potentially breaking bug fix:** `selector.nest()` now throws an error
1203
- if the first arguments contains the parent selector `&`.
1204
-
1205
- * Fixes a parsing bug with inline comments in selectors.
1206
-
1207
- * Improve some error messages for edge-case parse failures.
1208
-
1209
- * Throw a proper error when the same built-in module is `@use`d twice.
1210
-
1211
- * Don't crash when writing `Infinity` in JS mode.
1212
-
1213
- * Produce a better error message for positional arguments following named
1214
- arguments.
1215
-
1216
- ## 1.26.10
1217
-
1218
- * Fixes a bug where two adjacent combinators could cause an error.
1219
-
1220
- ## 1.26.9
1221
-
1222
- * Use an updated version of `node_preamble` when compiling to JS.
1223
-
1224
- ## 1.26.8
1225
-
1226
- * Fixes an error when emitting source maps to stdout.
1227
-
1228
- ## 1.26.7
1229
-
1230
- * No user-visible changes.
1231
-
1232
- ## 1.26.6
1233
-
1234
- * Fix a bug where escape sequences were improperly recognized in `@else` rules.
1235
-
1236
- ### JavaScript API
1237
-
1238
- * Add `sass.NULL`, `sass.TRUE`, and `sass.FALSE` constants to match Node Sass's
1239
- API.
1240
-
1241
- * If a custom Node importer returns both `file` and `contents`, don't attempt to
1242
- read the `file`. Instead, use the `contents` provided by the importer, with
1243
- `file` as the canonical url.
1244
-
1245
- ## 1.26.5
1246
-
1247
- * No user-visible changes.
1248
-
1249
- ## 1.26.4
1250
-
1251
- * Be more memory-efficient when handling `@forward`s through `@import`s.
1252
-
1253
- ## 1.26.3
1254
-
1255
- * Fix a bug where `--watch` mode could go into an infinite loop compiling CSS
1256
- files to themselves.
1257
-
1258
- ## 1.26.2
1259
-
1260
- * More aggressively eliminate redundant selectors in the `selector.extend()` and
1261
- `selector.replace()` functions.
1262
-
1263
- ## 1.26.1
1264
-
1265
- ### Command Line Interface
1266
-
1267
- * Fix a longstanding bug where `--watch` mode could enter into a state where
1268
- recompilation would not occur after a syntax error was introduced into a
1269
- dependency and then fixed.
1270
-
1271
- ## 1.26.0
1272
-
1273
- * **Potentially breaking bug fix:** `@use` rules whose URLs' basenames begin
1274
- with `_` now correctly exclude that `_` from the rules' namespaces.
1275
-
1276
- * Fix a bug where imported forwarded members weren't visible in mixins and
1277
- functions that were defined before the `@import`.
1278
-
1279
- * Don't throw errors if the exact same member is loaded or forwarded from
1280
- multiple modules at the same time.
1281
-
1282
- ## 1.25.2
1283
-
1284
- * Fix a bug where, under extremely rare circumstances, a valid variable could
1285
- become unassigned.
1286
-
1287
- ## 1.25.0
1288
-
1289
- * Add functions to the built-in "sass:math" module.
1290
-
1291
- * `clamp($min, $number, $max)`. Clamps `$number` in between `$min` and `$max`.
1292
-
1293
- * `hypot($numbers...)`. Given *n* numbers, outputs the length of the
1294
- *n*-dimensional vector that has components equal to each of the inputs.
1295
-
1296
- * Exponential. All inputs must be unitless.
1297
- * `log($number)` or `log($number, $base)`. If no base is provided, performs
1298
- a natural log.
1299
- * `pow($base, $exponent)`
1300
- * `sqrt($number)`
1301
-
1302
- * Trigonometric. The input must be an angle. If no unit is given, the input is
1303
- assumed to be in `rad`.
1304
- * `cos($number)`
1305
- * `sin($number)`
1306
- * `tan($number)`
1307
-
1308
- * Inverse trigonometric. The output is in `deg`.
1309
- * `acos($number)`. Input must be unitless.
1310
- * `asin($number)`. Input must be unitless.
1311
- * `atan($number)`. Input must be unitless.
1312
- * `atan2($y, $x)`. `$y` and `$x` must have compatible units or be unitless.
1313
-
1314
- * Add the variables `$pi` and `$e` to the built-in "sass:math" module.
1315
-
1316
- ### JavaScript API
1317
-
1318
- * `constructor.value` fields on value objects now match their Node Sass
1319
- equivalents.
1320
-
1321
- ## 1.24.5
1322
-
1323
- * Highlight contextually-relevant sections of the stylesheet in error messages,
1324
- rather than only highlighting the section where the error was detected.
1325
-
1326
- ## 1.24.4
1327
-
1328
- ### JavaScript API
1329
-
1330
- * Fix a bug where source map generation would crash with an absolute source map
1331
- path and a custom importer that returns string file contents.
1332
-
1333
- ## 1.24.3
1334
-
1335
- ### Command Line Interface
1336
-
1337
- * Fix a bug where `sass --version` would crash for certain executable
1338
- distributions.
1339
-
1340
- ## 1.24.2
1341
-
1342
- ### JavaScript API
1343
-
1344
- * Fix a bug introduced in the previous release that prevented custom importers
1345
- in Node.js from loading import-only files.
1346
-
1347
- ## 1.24.1
1348
-
1349
- * Fix a bug where the wrong file could be loaded when the same URL is used by
1350
- both a `@use` rule and an `@import` rule.
1351
-
1352
- ## 1.24.0
1353
-
1354
- * Add an optional `with` clause to the `@forward` rule. This works like the
1355
- `@use` rule's `with` clause, except that `@forward ... with` can declare
1356
- variables as `!default` to allow downstream modules to reconfigure their
1357
- values.
1358
-
1359
- * Support configuring modules through `@import` rules.
1360
-
1361
- ## 1.23.8
1362
-
1363
- * **Potentially breaking bug fix:** Members loaded through a nested `@import`
1364
- are no longer ever accessible outside that nested context.
1365
-
1366
- * Don't throw an error when importing two modules that both forward members with
1367
- the same name. The latter name now takes precedence over the former, as per
1368
- the specification.
1369
-
1370
- ### Dart API
1371
-
1372
- * `SassFormatException` now implements `SourceSpanFormatException` (and thus
1373
- `FormatException`).
1374
-
1375
- ## 1.23.7
1376
-
1377
- * No user-visible changes
1378
-
1379
- ## 1.23.6
1380
-
1381
- * No user-visible changes.
1382
-
1383
- ## 1.23.5
1384
-
1385
- * Support inline comments in the indented syntax.
1386
-
1387
- * When an overloaded function receives the wrong number of arguments, guess
1388
- which overload the user actually meant to invoke, and display the invalid
1389
- argument error for that overload.
1390
-
1391
- * When `@error` is used in a function or mixin, print the call site rather than
1392
- the location of the `@error` itself to better match the behavior of calling a
1393
- built-in function that throws an error.
1394
-
1395
- ## 1.23.4
1396
-
1397
- ### Command-Line Interface
1398
-
1399
- * Fix a bug where `--watch` wouldn't watch files referred to by `@forward`
1400
- rules.
1401
-
1402
- ## 1.23.3
1403
-
1404
- * Fix a bug where selectors were being trimmed over-eagerly when `@extend`
1405
- crossed module boundaries.
1406
-
1407
- ## 1.23.2
1408
-
1409
- ### Command-Line Interface
1410
-
1411
- * Fix a bug when compiling all Sass files in a directory where a CSS file could
1412
- be compiled to its own location, creating an infinite loop in `--watch` mode.
1413
-
1414
- * Properly compile CSS entrypoints in directories outside of `--watch` mode.
1415
-
1416
- ## 1.23.1
1417
-
1418
- * Fix a bug preventing built-in modules from being loaded within a configured
1419
- module.
1420
-
1421
- * Fix a bug preventing an unconfigured module from being loaded from within two
1422
- different configured modules.
1423
-
1424
- * Fix a bug when `meta.load-css()` was used to load some files that included
1425
- media queries.
1426
-
1427
- * Allow `saturate()` in plain CSS files, since it can be used as a plain CSS
1428
- filter function.
1429
-
1430
- * Improve the error messages for trying to access functions like `lighten()`
1431
- from the `sass:color` module.
1432
-
1433
- ## 1.23.0
1434
-
1435
- * **Launch the new Sass module system!** This adds:
1436
-
1437
- * The [`@use` rule][], which loads Sass files as *modules* and makes their
1438
- members available only in the current file, with automatic namespacing.
1439
-
1440
- [`@use` rule]: https://sass-lang.com/documentation/at-rules/use
1441
-
1442
- * The [`@forward` rule][], which makes members of another Sass file available
1443
- to stylesheets that `@use` the current file.
1444
-
1445
- [`@forward` rule]: https://sass-lang.com/documentation/at-rules/forward
1446
-
1447
- * Built-in modules named `sass:color`, `sass:list`, `sass:map`, `sass:math`,
1448
- `sass:meta`, `sass:selector`, and `sass:string` that provide access to all
1449
- the built-in Sass functions you know and love, with automatic module
1450
- namespaces.
1451
-
1452
- * The [`meta.load-css()` mixin][], which includes the CSS contents of a module
1453
- loaded from a (potentially dynamic) URL.
1454
-
1455
- [`meta.load-css()` mixin]: https://sass-lang.com/documentation/modules/meta#load-css
1456
-
1457
- * The [`meta.module-variables()` function][], which provides access to the
1458
- variables defined in a given module.
1459
-
1460
- [`meta.module-variables()` function]: https://sass-lang.com/documentation/modules/meta#module-variables
1461
-
1462
- * The [`meta.module-functions()` function][], which provides access to the
1463
- functions defined in a given module.
1464
-
1465
- [`meta.module-functions()` function]: https://sass-lang.com/documentation/modules/meta#module-functions
1466
-
1467
- Check out [the Sass blog][migrator blog] for more information on the new
1468
- module system. You can also use the new [Sass migrator][] to automatically
1469
- migrate your stylesheets to the new module system!
1470
-
1471
- [migrator blog]: https://sass-lang.com/blog/the-module-system-is-launched
1472
- [Sass migrator]: https://sass-lang.com/documentation/cli/migrator
1473
-
1474
- ## 1.22.12
1475
-
1476
- * **Potentially breaking bug fix:** character sequences consisting of two or
1477
- more hyphens followed by a number (such as `--123`), or two or more hyphens on
1478
- their own (such as `--`), are now parsed as identifiers [in accordance with
1479
- the CSS spec][ident-token-diagram].
1480
-
1481
- [ident-token-diagram]: https://drafts.csswg.org/css-syntax-3/#ident-token-diagram
1482
-
1483
- The sequence `--` was previously parsed as multiple applications of the `-`
1484
- operator. Since this is unlikely to be used intentionally in practice, we
1485
- consider this bug fix safe.
1486
-
1487
- ### Command-Line Interface
1488
-
1489
- * Fix a bug where changes in `.css` files would be ignored in `--watch` mode.
1490
-
1491
- ### JavaScript API
1492
-
1493
- * Allow underscore-separated custom functions to be defined.
1494
-
1495
- * Improve the performance of Node.js compilation involving many `@import`s.
1496
-
1497
- ## 1.22.11
1498
-
1499
- * Don't try to load unquoted plain-CSS indented-syntax imports.
1500
-
1501
- * Fix a couple edge cases in `@extend` logic and related selector functions:
1502
-
1503
- * Recognize `:matches()` and similar pseudo-selectors as superselectors of
1504
- matching complex selectors.
1505
-
1506
- * Recognize `::slotted()` as a superselector of other `::slotted()` selectors.
1507
-
1508
- * Recognize `:current()` with a vendor prefix as a superselector.
1509
-
1510
- ## 1.22.10
1511
-
1512
- * Fix a bug in which `get-function()` would fail to find a dash-separated
1513
- function when passed a function name with underscores.
1514
-
1515
- ## 1.22.9
1516
-
1517
- * Include argument names when reporting range errors and selector parse errors.
1518
-
1519
- * Avoid double `Error:` headers when reporting selector parse errors.
1520
-
1521
- * Clarify the error message when the wrong number of positional arguments are
1522
- passed along with a named argument.
1523
-
1524
- ### JavaScript API
1525
-
1526
- * Re-add support for Node Carbon (8.x).
1527
-
1528
- ## 1.22.8
1529
-
1530
- ### JavaScript API
1531
-
1532
- * Don't crash when running in a directory whose name contains URL-sensitive
1533
- characters.
1534
-
1535
- * Drop support for Node Carbon (8.x), which doesn't support `url.pathToFileURL`.
1536
-
1537
- ## 1.22.7
1538
-
1539
- * Restrict the supported versions of the Dart SDK to `^2.4.0`.
1540
-
1541
- ## 1.22.6
1542
-
1543
- * **Potentially breaking bug fix:** The `keywords()` function now converts
1544
- underscore-separated argument names to hyphen-separated names. This matches
1545
- LibSass's behavior, but not Ruby Sass's.
1546
-
1547
- * Further improve performance for logic-heavy stylesheets.
1548
-
1549
- * Improve a few error messages.
1550
-
1551
- ## 1.22.5
1552
-
1553
- ### JavaScript API
1554
-
1555
- * Improve performance for logic-heavy stylesheets.
1556
-
1557
- ## 1.22.4
1558
-
1559
- * Fix a bug where at-rules imported from within a style rule would appear within
1560
- that style rule rather than at the root of the document.
1561
-
1562
- ## 1.22.3
1563
-
1564
- * **Potentially breaking bug fix:** The argument name for the `saturate()`
1565
- function is now `$amount`, to match the name in LibSass and originally in Ruby
1566
- Sass.
1567
-
1568
- * **Potentially breaking bug fix:** The `invert()` function now properly returns
1569
- `#808080` when passed `$weight: 50%`. This matches the behavior in LibSass and
1570
- originally in Ruby Sass, as well as being consistent with other nearby values
1571
- of `$weight`.
1572
-
1573
- * **Potentially breaking bug fix:** The `invert()` function now throws an error
1574
- if it's used [as a plain CSS function][plain-CSS invert] *and* the Sass-only
1575
- `$weight` parameter is passed. This never did anything useful, so it's
1576
- considered a bug fix rather than a full breaking change.
1577
-
1578
- [plain-CSS invert]: https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/invert
1579
-
1580
- * **Potentially breaking bug fix**: The `str-insert()` function now properly
1581
- inserts at the end of the string if the `$index` is `-1`. This matches the
1582
- behavior in LibSass and originally in Ruby Sass.
1583
-
1584
- * **Potentially breaking bug fix**: An empty map returned by `map-remove()` is
1585
- now treated as identical to the literal value `()`, rather than being treated
1586
- as though it had a comma separator. This matches the original behavior in Ruby
1587
- Sass.
1588
-
1589
- * The `adjust-color()` function no longer throws an error when a large `$alpha`
1590
- value is combined with HSL adjustments.
1591
-
1592
- * The `alpha()` function now produces clearer error messages when the wrong
1593
- number of arguments are passed.
1594
-
1595
- * Fix a bug where the `str-slice()` function could produce invalid output when
1596
- passed a string that contains characters that aren't represented as a single
1597
- byte in UTF-16.
1598
-
1599
- * Improve the error message for an unknown separator name passed to the `join()`
1600
- or `append()` functions.
1601
-
1602
- * The `zip()` function no longer deadlocks if passed no arguments.
1603
-
1604
- * The `map-remove()` function can now take a `$key` named argument. This matches
1605
- the signature in LibSass and originally in Ruby Sass.
1606
-
1607
- ## 1.22.2
1608
-
1609
- ### JavaScript API
1610
-
1611
- * Avoid re-assigning the `require()` function to make the code statically
1612
- analyzable by Webpack.
1613
-
1614
- ## 1.22.1
1615
-
1616
- ### JavaScript API
1617
-
1618
- * Expand the dependency on `chokidar` to allow 3.x.
1619
-
1620
- ## 1.22.0
1621
-
1622
- * Produce better stack traces when importing a file that contains a syntax
1623
- error.
1624
-
1625
- * Make deprecation warnings for `!global` variable declarations that create new
1626
- variables clearer, especially in the case where the `!global` flag is
1627
- unnecessary because the variables are at the top level of the stylesheet.
1628
-
1629
- ### Dart API
1630
-
1631
- * Add a `Value.realNull` getter, which returns Dart's `null` if the value is
1632
- Sass's null.
1633
-
1634
- ## 1.21.0
1635
-
1636
- ### Dart API
1637
-
1638
- * Add a `sass` executable when installing the package through `pub`.
1639
-
1640
- * Add a top-level `warn()` function for custom functions and importers to print
1641
- warning messages.
1642
-
1643
- ## 1.20.3
1644
-
1645
- * No user-visible changes.
1646
-
1647
- ## 1.20.2
1648
-
1649
- * Fix a bug where numbers could be written using exponential notation in
1650
- Node.js.
1651
-
1652
- * Fix a crash that would appear when writing some very large integers to CSS.
1653
-
1654
- ### Command-Line Interface
1655
-
1656
- * Improve performance for stand-alone packages on Linux and Mac OS.
1657
-
1658
- ### JavaScript API
1659
-
1660
- * Pass imports to custom importers before resolving them using `includePaths` or
1661
- the `SASS_PATH` environment variable. This matches Node Sass's behavior, so
1662
- it's considered a bug fix.
1663
-
1664
- ## 1.20.1
1665
-
1666
- * No user-visible changes.
1667
-
1668
- ## 1.20.0
1669
-
1670
- * Support attribute selector modifiers, such as the `i` in `[title="test" i]`.
1671
-
1672
- ### Command-Line Interface
1673
-
1674
- * When compilation fails, Sass will now write the error message to the CSS
1675
- output as a comment and as the `content` property of a `body::before` rule so
1676
- it will show up in the browser (unless compiling to standard output). This can
1677
- be disabled with the `--no-error-css` flag, or forced even when compiling to
1678
- standard output with the `--error-css` flag.
1679
-
1680
- ### Dart API
1681
-
1682
- * Added `SassException.toCssString()`, which returns the contents of a CSS
1683
- stylesheet describing the error, as above.
1684
-
1685
- ## 1.19.0
1686
-
1687
- * Allow `!` in `url()`s without quotes.
1688
-
1689
- ### Dart API
1690
-
1691
- * `FilesystemImporter` now doesn't change its effective directory if the working
1692
- directory changes, even if it's passed a relative argument.
1693
-
1694
- ## 1.18.0
1695
-
1696
- * Avoid recursively listing directories when finding the canonical name of a
1697
- file on case-insensitive filesystems.
1698
-
1699
- * Fix importing files relative to `package:`-imported files.
1700
-
1701
- * Don't claim that "package:" URLs aren't supported when they actually are.
1702
-
1703
- ### Command-Line Interface
1704
-
1705
- * Add a `--no-charset` flag. If this flag is set, Sass will never emit a
1706
- `@charset` declaration or a byte-order mark, even if the CSS file contains
1707
- non-ASCII characters.
1708
-
1709
- ### Dart API
1710
-
1711
- * Add a `charset` option to `compile()`, `compileString()`, `compileAsync()` and
1712
- `compileStringAsync()`. If this option is set to `false`, Sass will never emit
1713
- a `@charset` declaration or a byte-order mark, even if the CSS file contains
1714
- non-ASCII characters.
1715
-
1716
- * Explicitly require that importers' `canonicalize()` methods be able to take
1717
- paths relative to their outputs as valid inputs. This isn't considered a
1718
- breaking change because the importer infrastructure already required this in
1719
- practice.
1720
-
1721
- ## 1.17.4
1722
-
1723
- * Consistently parse U+000C FORM FEED, U+000D CARRIAGE RETURN, and sequences of
1724
- U+000D CARRIAGE RETURN followed by U+000A LINE FEED as individual newlines.
1725
-
1726
- ### JavaScript API
1727
-
1728
- * Add a `sass.types.Error` constructor as an alias for `Error`. This makes our
1729
- custom function API compatible with Node Sass's.
1730
-
1731
- ## 1.17.3
1732
-
1733
- * Fix an edge case where slash-separated numbers were written to the stylesheet
1734
- with a slash even when they're used as part of another arithmetic operation,
1735
- such as being concatenated with a string.
1736
-
1737
- * Don't put style rules inside empty `@keyframes` selectors.
1738
-
1739
- ## 1.17.2
1740
-
1741
- * Deprecate `!global` variable assignments to variables that aren't yet defined.
1742
- This deprecation message can be avoided by assigning variables to `null` at
1743
- the top level before globally assigning values to them.
1744
-
1745
- ### Dart API
1746
-
1747
- * Explicitly mark classes that were never intended to be subclassed or
1748
- implemented as "sealed".
1749
-
1750
- ## 1.17.1
1751
-
1752
- * Properly quote attribute selector values that start with identifiers but end
1753
- with a non-identifier character.
1754
-
1755
- ## 1.17.0
1756
-
1757
- * Improve error output, particularly for errors that cover multiple lines.
1758
-
1759
- * Improve source locations for some parse errors. Rather than pointing to the
1760
- next token that wasn't what was expected, they point *after* the previous
1761
- token. This should generally provide more context for the syntax error.
1762
-
1763
- * Produce a better error message for style rules that are missing the closing
1764
- `}`.
1765
-
1766
- * Produce a better error message for style rules and property declarations
1767
- within `@function` rules.
1768
-
1769
- ### Command-Line Interface
1770
-
1771
- * Passing a directory on the command line now compiles all Sass source files in
1772
- the directory to CSS files in the same directory, as though `dir:dir` were
1773
- passed instead of just `dir`.
1774
-
1775
- * The new error output uses non-ASCII Unicode characters by default. Add a
1776
- `--no-unicode` flag to disable this.
1777
-
1778
- ## 1.16.1
1779
-
1780
- * Fix a performance bug where stylesheet evaluation could take a very long time
1781
- when many binary operators were used in sequence.
1782
-
1783
- ## 1.16.0
1784
-
1785
- * `rgb()` and `hsl()` now treat unquoted strings beginning with `env()`,
1786
- `min()`, and `max()` as special number strings like `calc()`.
1787
-
1788
- ## 1.15.3
1789
-
1790
- * Properly merge `all and` media queries. These queries were previously being
1791
- merged as though `all` referred to a specific media type, rather than all
1792
- media types.
1793
-
1794
- * Never remove units from 0 values in compressed mode. This wasn't safe in
1795
- general, since some properties (such as `line-height`) interpret `0` as a
1796
- `<number>` rather than a `<length>` which can break CSS transforms. It's
1797
- better to do this optimization in a dedicated compressor that's aware of CSS
1798
- property semantics.
1799
-
1800
- * Match Ruby Sass's behavior in some edge-cases involving numbers with many
1801
- significant digits.
1802
-
1803
- * Emit escaped tab characters in identifiers as `\9` rather than a backslash
1804
- followed by a literal tab.
1805
-
1806
- ### Command-Line Interface
1807
-
1808
- * The source map generated for a stylesheet read from standard input now uses a
1809
- `data:` URL to include that stylesheet's contents in the source map.
1810
-
1811
- ### Node JS API
1812
-
1813
- * `this.includePaths` for a running importer is now a `;`-separated string on
1814
- Windows, rather than `:`-separated. This matches Node Sass's behavior.
1815
-
1816
- ### Dart API
1817
-
1818
- * The URL used in a source map to refer to a stylesheet loaded from an importer
1819
- is now `ImportResult.sourceMapUrl` as documented.
1820
-
1821
- ## 1.15.2
1822
-
1823
- ### Node JS API
1824
-
1825
- * When `setValue()` is called on a Sass string object, make it unquoted even if
1826
- it was quoted originally, to match the behavior of Node Sass.
1827
-
1828
- ## 1.15.1
1829
-
1830
- * Always add quotes to attribute selector values that begin with `--`, since IE
1831
- 11 doesn't consider them to be identifiers.
1832
-
1833
- ## 1.15.0
1834
-
1835
- * Add support for passing arguments to `@content` blocks. See [the
1836
- proposal][content-args] for details.
1837
-
1838
- * Add support for the new `rgb()` and `hsl()` syntax introduced in CSS Colors
1839
- Level 4, such as `rgb(0% 100% 0% / 0.5)`. See [the proposal][color-4-rgb-hsl]
1840
- for more details.
1841
-
1842
- * Add support for interpolation in at-rule names. See [the
1843
- proposal][at-rule-interpolation] for details.
1844
-
1845
- * Add paths from the `SASS_PATH` environment variable to the load paths in the
1846
- command-line interface, Dart API, and JS API. These load paths are checked
1847
- just after the load paths explicitly passed by the user.
1848
-
1849
- * Allow saturation and lightness values outside of the `0%` to `100%` range in
1850
- the `hsl()` and `hsla()` functions. They're now clamped to be within that
1851
- range rather than producing an error if they're outside it.
1852
-
1853
- * Properly compile selectors that end in escaped whitespace.
1854
-
1855
- [content-args]: https://github.com/sass/language/blob/master/accepted/content-args.md
1856
- [color-4-rgb-hsl]: https://github.com/sass/language/blob/master/accepted/color-4-rgb-hsl.md
1857
- [at-rule-interpolation]: https://github.com/sass/language/blob/master/accepted/at-rule-interpolation.md
1858
-
1859
- ### JavaScript API
1860
-
1861
- * Always include the error location in error messages.
1862
-
1863
- ## 1.14.4
1864
-
1865
- * Properly escape U+0009 CHARACTER TABULATION in unquoted strings.
1866
-
1867
- ## 1.14.3
1868
-
1869
- * Treat `:before`, `:after`, `:first-line`, and `:first-letter` as
1870
- pseudo-elements for the purposes of `@extend`.
1871
-
1872
- * When running in compressed mode, remove spaces around combinators in complex
1873
- selectors, so a selector like `a > b` is output as `a>b`.
1874
-
1875
- * Properly indicate the source span for errors involving binary operation
1876
- expressions whose operands are parenthesized.
1877
-
1878
- ## 1.14.2
1879
-
1880
- * Fix a bug where loading the same stylesheet from two different import paths
1881
- could cause its imports to fail to resolve.
1882
-
1883
- * Properly escape U+001F INFORMATION SEPARATOR ONE in unquoted strings.
1884
-
1885
- ### Command-Line Interface
1886
-
1887
- * Don't crash when using `@debug` in a stylesheet passed on standard input.
1888
-
1889
- ### Dart API
1890
-
1891
- * `AsyncImporter.canonicalize()` and `Importer.canonicalize()` must now return
1892
- absolute URLs. Relative URLs are still supported, but are deprecated and will
1893
- be removed in a future release.
1894
-
1895
- ## 1.14.1
1896
-
1897
- * Canonicalize escaped digits at the beginning of identifiers as hex escapes.
1898
-
1899
- * Properly parse property declarations that are both *in* content blocks and
1900
- written *after* content blocks.
1901
-
1902
- ### Command-Line Interface
1903
-
1904
- * Print more readable paths in `--watch` mode.
1905
-
1906
- ## 1.14.0
1907
-
1908
- ### BREAKING CHANGE
1909
-
1910
- In accordance with our [compatibility policy][], breaking changes made for CSS
1911
- compatibility reasons are released as minor version revision after a three-month
1912
- deprecation period.
1913
-
1914
- [compatibility policy]: README.md#compatibility-policy
1915
-
1916
- * Tokens such as `#abcd` that are now interpreted as hex colors with alpha
1917
- channels, rather than unquoted ID strings.
1918
-
1919
- ## 1.13.4
1920
-
1921
- ### Node JS
1922
-
1923
- * Tweak JS compilation options to substantially improve performance.
1924
-
1925
- ## 1.13.3
1926
-
1927
- * Properly generate source maps for stylesheets that emit `@charset`
1928
- declarations.
1929
-
1930
- ### Command-Line Interface
1931
-
1932
- * Don't error out when passing `--embed-source-maps` along with
1933
- `--embed-sources` for stylesheets that contain non-ASCII characters.
1934
-
1935
- ## 1.13.2
1936
-
1937
- * Properly parse `:nth-child()` and `:nth-last-child()` selectors with
1938
- whitespace around the argument.
1939
-
1940
- * Don't emit extra whitespace in the arguments for `:nth-child()` and
1941
- `:nth-last-child()` selectors.
1942
-
1943
- * Fix support for CSS hacks in plain CSS mode.
1944
-
1945
- ## 1.13.1
1946
-
1947
- * Allow an IE-style single equals operator in plain CSS imports.
1948
-
1949
- ## 1.13.0
1950
-
1951
- * Allow `@extend` to be used with multiple comma-separated simple selectors.
1952
- This is already supported by other implementations, but fell through the
1953
- cracks for Dart Sass until now.
1954
-
1955
- * Don't crash when a media rule contains another media rule followed by a style
1956
- rule.
1957
-
1958
- ## 1.12.0
1959
-
1960
- ### Dart API
1961
-
1962
- * Add a `SassException` type that provides information about Sass compilation
1963
- failures.
1964
-
1965
- ### Node JS API
1966
-
1967
- * Remove the source map comment from the compiled JS. We don't ship with the
1968
- source map, so this pointed to nothing.
1969
-
1970
- ## 1.11.0
1971
-
1972
- * Add support for importing plain CSS files. They can only be imported *without*
1973
- an extension—for example, `@import "style"` will import `style.css`. Plain CSS
1974
- files imported this way only support standard CSS features, not Sass
1975
- extensions.
1976
-
1977
- See [the proposal][css-import] for details.
1978
-
1979
- * Add support for CSS's `min()` and `max()` [math functions][]. A `min()` and
1980
- `max()` call will continue to be parsed as a Sass function if it involves any
1981
- Sass-specific features like variables or function calls, but if it's valid
1982
- plain CSS (optionally with interpolation) it will be emitted as plain CSS instead.
1983
-
1984
- See [the proposal][css-min-max] for details.
1985
-
1986
- * Add support for range-format media features like `(10px < width < 100px)`. See
1987
- [the proposal][media-ranges] for details.
1988
-
1989
- * Normalize escape codes in identifiers so that, for example, `éclair` and
1990
- `\E9clair` are parsed to the same value. See
1991
- [the proposal][identifier-escapes] for details.
1992
-
1993
- * Don't choke on a [byte-order mark][] at the beginning of a document when
1994
- running in JavaScript.
1995
-
1996
- [math functions]: https://drafts.csswg.org/css-values/#math-function
1997
- [css-import]: https://github.com/sass/language/blob/master/accepted/css-imports.md
1998
- [css-min-max]: https://github.com/sass/language/blob/master/accepted/min-max.md
1999
- [media-ranges]: https://github.com/sass/language/blob/master/accepted/media-ranges.md
2000
- [identifier-escapes]: https://github.com/sass/language/blob/master/accepted/identifier-escapes.md
2001
- [byte-order mark]: https://en.wikipedia.org/wiki/Byte_order_mark
2002
-
2003
- ### Command-Line Interface
2004
-
2005
- * The `--watch` command now continues to recompile a file after a syntax error
2006
- has been detected.
2007
-
2008
- ### Dart API
2009
-
2010
- * Added a `Syntax` enum to indicate syntaxes for Sass source files.
2011
-
2012
- * The `compile()` and `compileAsync()` functions now parse files with the `.css`
2013
- extension as plain CSS.
2014
-
2015
- * Added a `syntax` parameter to `compileString()` and `compileStringAsync()`.
2016
-
2017
- * Deprecated the `indented` parameter to `compileString()` and `compileStringAsync()`.
2018
-
2019
- * Added a `syntax` parameter to `new ImporterResult()` and a
2020
- `ImporterResult.syntax` getter to set the syntax of the source file.
2021
-
2022
- * Deprecated the `indented` parameter to `new ImporterResult()` and the
2023
- `ImporterResult.indented` getter in favor of `syntax`.
2024
-
2025
- ## 1.10.4
2026
-
2027
- ### Command-Line Interface
2028
-
2029
- * Fix a Homebrew installation failure.
2030
-
2031
- ## 1.10.3
2032
-
2033
- ### Command-Line Interface
2034
-
2035
- * Run the Chocolatey script with the correct arguments so it doesn't crash.
2036
-
2037
- ## 1.10.2
2038
-
2039
- * No user-visible changes.
2040
-
2041
- ## 1.10.1
2042
-
2043
- ### Node JS API
2044
-
2045
- * Don't crash when passing both `includePaths` and `importer`.
2046
-
2047
- ## 1.10.0
2048
-
2049
- * When two `@media` rules' queries can't be merged, leave nested rules in place
2050
- for browsers that support them.
2051
-
2052
- * Fix a typo in an error message.
2053
-
2054
- ## 1.9.2
2055
-
2056
- ### Node JS API
2057
-
2058
- * Produce more readable filesystem errors, such as when a file doesn't exist.
2059
-
2060
- ## 1.9.1
2061
-
2062
- ### Command-Line Interface
2063
-
2064
- * Don't emit ANSI codes to Windows terminals that don't support them.
2065
-
2066
- * Fix a bug where `--watch` crashed on Mac OS.
2067
-
2068
- ## 1.9.0
2069
-
2070
- ### Node API
2071
-
2072
- * Add support for `new sass.types.Color(argb)` for creating colors from ARGB hex
2073
- numbers. This was overlooked when initially adding support for Node Sass's
2074
- JavaScript API.
2075
-
2076
- ## 1.8.0
2077
-
2078
- ### Command-Line Interface
2079
-
2080
- * Add a `--poll` flag to make `--watch` mode repeatedly check the filesystem for
2081
- updates rather than relying on native filesystem notifications.
2082
-
2083
- * Add a `--stop-on-error` flag to stop compiling additional files once an error
2084
- is encountered.
2085
-
2086
- ## 1.7.3
2087
-
2088
- * No user-visible changes.
2089
-
2090
- ## 1.7.2
2091
-
2092
- * Add a deprecation warning for `@-moz-document`, except for cases where only an
2093
- empty `url-prefix()` is used. Support is [being removed from Firefox][] and
2094
- will eventually be removed from Sass as well.
2095
-
2096
- [being removed from Firefox]: https://www.fxsitecompat.com/en-CA/docs/2018/moz-document-support-has-been-dropped-except-for-empty-url-prefix/
2097
-
2098
- * Fix a bug where `@-moz-document` functions with string arguments weren't being
2099
- parsed.
2100
-
2101
- ### Command-Line Interface
2102
-
2103
- * Don't crash when a syntax error is added to a watched file.
2104
-
2105
- ## 1.7.1
2106
-
2107
- * Fix crashes in released binaries.
2108
-
2109
- ## 1.7.0
2110
-
2111
- * Emit deprecation warnings for tokens such as `#abcd` that are ambiguous
2112
- between ID strings and hex colors with alpha channels. These will be
2113
- interpreted as colors in a release on or after 19 September 2018.
2114
-
2115
- * Parse unambiguous hex colors with alpha channels as colors.
2116
-
2117
- * Fix a bug where relative imports from files on the load path could look in the
2118
- incorrect location.
2119
-
2120
- ## 1.6.2
2121
-
2122
- ### Command-Line Interface
2123
-
2124
- * Fix a bug where the source map comment in the generated CSS could refer to the
2125
- source map file using an incorrect URL.
2126
-
2127
- ## 1.6.1
2128
-
2129
- * No user-visible changes.
2130
-
2131
- ## 1.6.0
2132
-
2133
- * Produce better errors when expected tokens are missing before a closing brace.
2134
-
2135
- * Avoid crashing when compiling a non-partial stylesheet that exists on the
2136
- filesystem next to a partial with the same name.
2137
-
2138
- ### Command-Line Interface
2139
-
2140
- * Add support for the `--watch`, which watches for changes in Sass files on the
2141
- filesystem and ensures that the compiled CSS is up-to-date.
2142
-
2143
- * When using `--update`, surface errors when an import doesn't exist even if the
2144
- file containing the import hasn't been modified.
2145
-
2146
- * When compilation fails, delete the output file rather than leaving an outdated
2147
- version.
2148
-
2149
- ## 1.5.1
2150
-
2151
- * Fix a bug where an absolute Windows path would be considered an `input:output`
2152
- pair.
2153
-
2154
- * Forbid custom properties that have no values, like `--foo:;`, since they're
2155
- forbidden by the CSS spec.
2156
-
2157
- ## 1.5.0
2158
-
2159
- * Fix a bug where an importer would be passed an incorrectly-resolved URL when
2160
- handling a relative import.
2161
-
2162
- * Throw an error when an import is ambiguous due to a partial and a non-partial
2163
- with the same name, or multiple files with different extensions. This matches
2164
- the standard Sass behavior.
2165
-
2166
- ### Command-Line Interface
2167
-
2168
- * Add an `--interactive` flag that supports interactively running Sass
2169
- expressions (thanks to [Jen Thakar][]!).
2170
-
2171
- [Jen Thakar]: https://github.com/jathak
2172
-
2173
- ## 1.4.0
2174
-
2175
- * Improve the error message for invalid semicolons in the indented syntax.
2176
-
2177
- * Properly disallow semicolons after declarations in the indented syntax.
2178
-
2179
- ### Command-Line Interface
2180
-
2181
- * Add support for compiling multiple files at once by writing
2182
- `sass input.scss:output.css`. Note that unlike Ruby Sass, this *always*
2183
- compiles files by default regardless of when they were modified.
2184
-
2185
- This syntax also supports compiling entire directories at once. For example,
2186
- `sass templates/stylesheets:public/css` compiles all non-partial Sass files
2187
- in `templates/stylesheets` to CSS files in `public/css`.
2188
-
2189
- * Add an `--update` flag that tells Sass to compile only stylesheets that have
2190
- been (transitively) modified since the CSS file was generated.
2191
-
2192
- ### Dart API
2193
-
2194
- * Add `Importer.modificationTime()` and `AsyncImporter.modificationTime()` which
2195
- report the last time a stylesheet was modified.
2196
-
2197
- ### Node API
2198
-
2199
- * Generate source maps when the `sourceMaps` option is set to a string and the
2200
- `outFile` option is not set.
2201
-
2202
- ## 1.3.2
2203
-
2204
- * Add support for `@elseif` as an alias of `@else if`. This is not an
2205
- intentional feature, so using it will cause a deprecation warning. It will be
2206
- removed at some point in the future.
2207
-
2208
- ## 1.3.1
2209
-
2210
- ### Node API
2211
-
2212
- * Fix loading imports relative to stylesheets that were themselves imported
2213
- though relative include paths.
2214
-
2215
- ## 1.3.0
2216
-
2217
- ### Command-Line Interface
2218
-
2219
- * Generate source map files by default when writing to disk. This can be
2220
- disabled by passing `--no-source-map`.
2221
-
2222
- * Add a `--source-map-urls` option to control whether the source file URLs in
2223
- the generated source map are relative or absolute.
2224
-
2225
- * Add an `--embed-sources` option to embed the contents of all source files in
2226
- the generated source map.
2227
-
2228
- * Add an `--embed-source-map` option to embed the generated source map as a
2229
- `data:` URL in the generated CSS.
2230
-
2231
- ### Dart API
2232
-
2233
- * Add a `sourceMap` parameter to `compile()`, `compileString()`,
2234
- `compileAsync()`, and `compileStringAsync()`. This takes a callback that's
2235
- called with a [`SingleMapping`][] that contains the source map information for
2236
- the compiled CSS file.
2237
-
2238
- [`SingleMapping`]: https://www.dartdocs.org/documentation/source_maps/latest/source_maps.parser/SingleMapping-class.html
2239
-
2240
- ### Node API
2241
-
2242
- * Added support for the `sourceMap`, `omitSourceMapUrl`, `outFile`,
2243
- `sourceMapContents`, `sourceMapEmbed`, and `sourceMapRoot` options to
2244
- `render()` and `renderSync()`.
2245
-
2246
- * Fix a bug where passing a relative path to `render()` or `renderSync()` would
2247
- cause relative imports to break.
2248
-
2249
- * Fix a crash when printing warnings in stylesheets compiled using `render()` or
2250
- `renderSync()`.
2251
-
2252
- * Fix a bug where format errors were reported badly on Windows.
2253
-
2254
- ## 1.2.1
2255
-
2256
- * Always emit units in compressed mode for `0` dimensions other than lengths and
2257
- angles.
2258
-
2259
- ## 1.2.0
2260
-
2261
- * The command-line executable will now create the directory for the resulting
2262
- CSS if that directory doesn't exist.
2263
-
2264
- * Properly parse `#{$var} -#{$var}` as two separate values in a list rather than
2265
- one value being subtracted from another.
2266
-
2267
- * Improve the error message for extending compound selectors.
2268
-
2269
- ## 1.1.1
2270
-
2271
- * Add a commit that was accidentally left out of 1.1.0.
2272
-
2273
- ## 1.1.0
2274
-
2275
- * The command-line executable can now be used to write an output file to disk
2276
- using `sass input.scss output.css`.
2277
-
2278
- * Use a POSIX-shell-compatible means of finding the location of the `sass` shell
2279
- script.
2280
-
2281
- ## 1.0.0
2282
-
2283
- **Initial stable release.**
2284
-
2285
- ### Changes Since 1.0.0-rc.1
2286
-
2287
- * Allow `!` in custom property values ([#260][]).
2288
-
2289
- [#260]: https://github.com/sass/dart-sass/issues/260
2290
-
2291
- #### Dart API
2292
-
2293
- * Remove the deprecated `render()` function.
2294
-
2295
- #### Node API
2296
-
2297
- * Errors are now subtypes of the `Error` type.
2298
-
2299
- * Allow both the `data` and `file` options to be passed to `render()` and
2300
- `renderSync()` at once. The `data` option will be used as the contents of the
2301
- stylesheet, and the `file` option will be used as the path for error reporting
2302
- and relative imports. This matches Node Sass's behavior.
2303
-
2304
- ## 1.0.0-rc.1
2305
-
2306
- * Add support for importing an `_index.scss` or `_index.sass` file when
2307
- importing a directory.
2308
-
2309
- * Add a `--load-path` command-line option (alias `-I`) for passing additional
2310
- paths to search for Sass files to import.
2311
-
2312
- * Add a `--quiet` command-line option (alias `-q`) for silencing warnings.
2313
-
2314
- * Add an `--indented` command-line option for using the indented syntax with a
2315
- stylesheet from standard input.
2316
-
2317
- * Don't merge the media queries `not type` and `(feature)`. We had previously
2318
- been generating `not type and (feature)`, but that's not actually the
2319
- intersection of the two queries.
2320
-
2321
- * Don't crash on `$x % 0`.
2322
-
2323
- * The standalone executable distributed on GitHub is now named `sass` rather
2324
- than `dart-sass`. The `dart-sass` executable will remain, with a deprecation
2325
- message, until 1.0.0 is released.
2326
-
2327
- ### Dart API
2328
-
2329
- * Add a `Logger` class that allows users to control how messages are printed by
2330
- stylesheets.
2331
-
2332
- * Add a `logger` parameter to `compile()`, `compileAsync()`, `compileString()`,
2333
- and `compileStringAsync()`.
2334
-
2335
- ### Node JS API
2336
-
2337
- * Import URLs passed to importers are no longer normalized. For example, if a
2338
- stylesheet contains `@import "./foo.scss"`, importers will now receive
2339
- `"./foo.scss"` rather than `"foo.scss"`.
2340
-
2341
- ## 1.0.0-beta.5.3
2342
-
2343
- * Support hard tabs in the indented syntax.
2344
-
2345
- * Improve the formatting of comments that don't start on the same line as the
2346
- opening `/*`.
2347
-
2348
- * Preserve whitespace after `and` in media queries in compressed mode.
2349
-
2350
- ### Indented Syntax
2351
-
2352
- * Properly parse multi-line selectors.
2353
-
2354
- * Don't deadlock on `/*` comments.
2355
-
2356
- * Don't add an extra `*/` to comments that already have it.
2357
-
2358
- * Preserve empty lines in `/*` comments.
2359
-
2360
- ## 1.0.0-beta.5.2
2361
-
2362
- * Fix a bug where some colors would crash `compressed` mode.
2363
-
2364
- ## 1.0.0-beta.5.1
2365
-
2366
- * Add a `compressed` output style.
2367
-
2368
- * Emit a warning when `&&` is used, since it's probably not what the user means.
2369
-
2370
- * `round()` now returns the correct results for negative numbers that should
2371
- round down.
2372
-
2373
- * `var()` may now be passed in place of multiple arguments to `rgb()`, `rgba()`,
2374
- `hsl()` and `hsla()`.
2375
-
2376
- * Fix some cases where equivalent numbers wouldn't count as the same keys in
2377
- maps.
2378
-
2379
- * Fix a bug where multiplication like `(1/1px) * (1px/1)` wouldn't properly
2380
- cancel out units.
2381
-
2382
- * Fix a bug where dividing by a compatible unit would produce an invalid
2383
- result.
2384
-
2385
- * Remove a non-`sh`-compatible idiom from the standalone shell script.
2386
-
2387
- ### Dart API
2388
-
2389
- * Add a `functions` parameter to `compile()`, `compleString()`,
2390
- `compileAsync()`, and `compileStringAsync()`. This allows users to define
2391
- custom functions in Dart that can be invoked from Sass stylesheets.
2392
-
2393
- * Expose the `Callable` and `AsyncCallable` types, which represent functions
2394
- that can be invoked from Sass.
2395
-
2396
- * Expose the `Value` type and its subclasses, as well as the top-level
2397
- `sassTrue`, `sassFalse`, and `sassNull` values, which represent Sass values
2398
- that may be passed into or returned from custom functions.
2399
-
2400
- * Expose the `OutputStyle` enum, and add a `style` parameter to `compile()`,
2401
- `compleString()`, `compileAsync()`, and `compileStringAsync()` that allows
2402
- users to control the output style.
2403
-
2404
- ### Node JS API
2405
-
2406
- * Support the `functions` option.
2407
-
2408
- * Support the `"compressed"` value for the `outputStyle` option.
2409
-
2410
- ## 1.0.0-beta.4
2411
-
2412
- * Support unquoted imports in the indented syntax.
2413
-
2414
- * Fix a crash when `:not(...)` extends a selector that appears in
2415
- `:not(:not(...))`.
2416
-
2417
- ### Node JS API
2418
-
2419
- * Add support for asynchronous importers to `render()` and `renderSync()`.
2420
-
2421
- ### Dart API
2422
-
2423
- * Add `compileAsync()` and `compileStringAsync()` methods. These run
2424
- asynchronously, which allows them to take asynchronous importers (see below).
2425
-
2426
- * Add an `AsyncImporter` class. This allows imports to be resolved
2427
- asynchronously in case no synchronous APIs are available. `AsyncImporter`s are
2428
- only compatible with `compileAysnc()` and `compileStringAsync()`.
2429
-
2430
- ## 1.0.0-beta.3
2431
-
2432
- * Properly parse numbers with exponents.
2433
-
2434
- * Don't crash when evaluating CSS variables whose names are entirely
2435
- interpolated (for example, `#{--foo}: ...`).
2436
-
2437
- ### Node JS API
2438
-
2439
- * Add support for the `importer` option to `render()` and `renderSync()`.
2440
- Only synchronous importers are currently supported.
2441
-
2442
- ### Dart API
2443
-
2444
- * Added an `Importer` class. This can be extended by users to provide support
2445
- for custom resolution for `@import` rules.
2446
-
2447
- * Added built-in `FilesystemImporter` and `PackageImporter` implementations that
2448
- support resolving `file:` and `package:` URLs, respectively.
2449
-
2450
- * Added an `importers` argument to the `compile()` and `compileString()`
2451
- functions that provides `Importer`s to use when resolving `@import` rules.
2452
-
2453
- * Added a `loadPaths` argument to the `compile()` and `compileString()`
2454
- functions that provides paths to search for stylesheets when resolving
2455
- `@import` rules. This is a shorthand for passing `FilesystemImporter`s to the
2456
- `importers` argument.
2457
-
2458
- ## 1.0.0-beta.2
2459
-
2460
- * Add support for the `::slotted()` pseudo-element.
2461
-
2462
- * Generated transparent colors will now be emitted as `rgba(0, 0, 0, 0)` rather
2463
- than `transparent`. This works around a bug wherein IE incorrectly handles the
2464
- latter format.
2465
-
2466
- ### Command-Line Interface
2467
-
2468
- * Improve the logic for whether to use terminal colors by default.
2469
-
2470
- ### Node JS API
2471
-
2472
- * Add support for `data`, `includePaths`, `indentedSyntax`, `lineFeed`,
2473
- `indentWidth`, and `indentType` options to `render()` and `renderSync()`.
2474
-
2475
- * The result object returned by `render()` and `renderSync()` now includes the
2476
- `stats` object which provides metadata about the compilation process.
2477
-
2478
- * The error object thrown by `render()` and `renderSync()` now includes `line`,
2479
- `column`, `file`, `status`, and `formatted` fields. The `message` field and
2480
- `toString()` also provide more information.
2481
-
2482
- ### Dart API
2483
-
2484
- * Add a `renderString()` method for rendering Sass source that's not in a file
2485
- on disk.
2486
-
2487
- ## 1.0.0-beta.1
2488
-
2489
- * Drop support for the reference combinator. This has been removed from the
2490
- spec, and will be deprecated and eventually removed in other implementations.
2491
-
2492
- * Trust type annotations when compiling to JavaScript, which makes it
2493
- substantially faster.
2494
-
2495
- * Compile to minified JavaScript, which decreases the code size substantially
2496
- and makes startup a little faster.
2497
-
2498
- * Fix a crash when inspecting a string expression that ended in "\a".
2499
-
2500
- * Fix a bug where declarations and `@extend` were allowed outside of a style
2501
- rule in certain circumstances.
2502
-
2503
- * Fix `not` in parentheses in `@supports` conditions.
2504
-
2505
- * Allow `url` as an identifier name.
2506
-
2507
- * Properly parse `/***/` in selectors.
2508
-
2509
- * Properly parse unary operators immediately after commas.
2510
-
2511
- * Match Ruby Sass's rounding behavior for all functions.
2512
-
2513
- * Allow `\` at the beginning of a selector in the indented syntax.
2514
-
2515
- * Fix a number of `@extend` bugs:
2516
-
2517
- * `selector-extend()` and `selector-replace()` now allow compound selector
2518
- extendees.
2519
-
2520
- * Remove the universal selector `*` when unifying with other selectors.
2521
-
2522
- * Properly unify the result of multiple simple selectors in the same compound
2523
- selector being extended.
2524
-
2525
- * Properly handle extensions being extended.
2526
-
2527
- * Properly follow the [first law of `@extend`][laws].
2528
-
2529
- * Fix selector specificity tracking to follow the
2530
- [second law of `@extend`][laws].
2531
-
2532
- * Allow extensions that match selectors but fail to unify.
2533
-
2534
- * Partially-extended selectors are no longer used as parent selectors.
2535
-
2536
- * Fix an edge case where both the extender and the extended selector
2537
- have invalid combinator sequences.
2538
-
2539
- * Don't crash with a "Bad state: no element" error in certain edge cases.
2540
-
2541
- [laws]: https://github.com/sass/sass/issues/324#issuecomment-4607184
2542
-
2543
- ## 1.0.0-alpha.9
2544
-
2545
- * Elements without a namespace (such as `div`) are no longer unified with
2546
- elements with the empty namespace (such as `|div`). This unification didn't
2547
- match the results returned by `is-superselector()`, and was not guaranteed to
2548
- be valid.
2549
-
2550
- * Support `&` within `@at-root`.
2551
-
2552
- * Properly error when a compound selector is followed immediately by `&`.
2553
-
2554
- * Properly handle variable scoping in `@at-root` and nested properties.
2555
-
2556
- * Properly handle placeholder selectors in selector pseudos.
2557
-
2558
- * Properly short-circuit the `or` and `and` operators.
2559
-
2560
- * Support `--$variable`.
2561
-
2562
- * Don't consider unitless numbers equal to numbers with units.
2563
-
2564
- * Warn about using named colors in interpolation.
2565
-
2566
- * Don't emit loud comments in functions.
2567
-
2568
- * Detect import loops.
2569
-
2570
- * Fix `@import` with a `supports()` clause.
2571
-
2572
- * Forbid functions named "and", "or", and "not".
2573
-
2574
- * Fix `type-of()` with a function.
2575
-
2576
- * Emit a nicer error for invalid tokens in a selector.
2577
-
2578
- * Fix `invert()` with a `$weight` parameter.
2579
-
2580
- * Fix a unit-parsing edge-cases.
2581
-
2582
- * Always parse imports with queries as plain CSS imports.
2583
-
2584
- * Support `&` followed by a non-identifier.
2585
-
2586
- * Properly handle split media queries.
2587
-
2588
- * Properly handle a placeholder selector that isn't at the beginning of a
2589
- compound selector.
2590
-
2591
- * Fix more `str-slice()` bugs.
2592
-
2593
- * Fix the `%` operator.
2594
-
2595
- * Allow whitespace between `=` and the mixin name in the indented syntax.
2596
-
2597
- * Fix some slash division edge cases.
2598
-
2599
- * Fix `not` when used like a function.
2600
-
2601
- * Fix attribute selectors with single-character values.
2602
-
2603
- * Fix some bugs with the `call()` function.
2604
-
2605
- * Properly handle a backslash followed by a CRLF sequence in a quoted string.
2606
-
2607
- * Fix numbers divided by colors.
2608
-
2609
- * Support slash-separated numbers in arguments to plain CSS functions.
2610
-
2611
- * Error out if a function is passed an unknown named parameter.
2612
-
2613
- * Improve the speed of loading large files on Node.
2614
-
2615
- * Don't consider browser-prefixed selector pseudos to be superselectors of
2616
- differently- or non-prefixed selector pseudos with the same base name.
2617
-
2618
- * Fix an `@extend` edge case involving multiple combinators in a row.
2619
-
2620
- * Fix a bug where a `@content` block could get incorrectly passed to a mixin.
2621
-
2622
- * Properly isolate the lexical environments of different calls to the same mixin
2623
- and function.
2624
-
2625
- ## 1.0.0-alpha.8
2626
-
2627
- * Add the `content-exists()` function.
2628
-
2629
- * Support interpolation in loud comments.
2630
-
2631
- * Fix a bug where even valid semicolons and exclamation marks in custom property
2632
- values were disallowed.
2633
-
2634
- * Disallow invalid function names.
2635
-
2636
- * Disallow extending across media queries.
2637
-
2638
- * Properly parse whitespace after `...` in argument declaration lists.
2639
-
2640
- * Support terse mixin syntax in the indented syntax.
2641
-
2642
- * Fix `@at-root` query parsing.
2643
-
2644
- * Support special functions in `@-moz-document`.
2645
-
2646
- * Support `...` after a digit.
2647
-
2648
- * Fix some bugs when treating a map as a list of pairs.
2649
-
2650
- ## 1.0.0-alpha.7
2651
-
2652
- * Fix `function-exists()`, `variable-exists()`, and `mixin-exists()` to use the
2653
- lexical scope rather than always using the global scope.
2654
-
2655
- * `str-index()` now correctly inserts at negative indices.
2656
-
2657
- * Properly parse `url()`s that contain comment-like text.
2658
-
2659
- * Fix a few more small `@extend` bugs.
2660
-
2661
- * Fix a bug where interpolation in a quoted string was being dropped in some
2662
- circumstances.
2663
-
2664
- * Properly handle `@for` rules where each bound has a different unit.
2665
-
2666
- * Forbid mixins and functions from being defined in control directives.
2667
-
2668
- * Fix a superselector-computation edge case involving `:not()`.
2669
-
2670
- * Gracefully handle input files that are invalid UTF-8.
2671
-
2672
- * Print a Sass stack trace when a file fails to load.
2673
-
2674
- ## 1.0.0-alpha.6
2675
-
2676
- * Allow `var()` to be passed to `rgb()`, `rgba()`, `hsl()`, and `hsla()`.
2677
-
2678
- * Fix conversions between numbers with `dpi`, `dpcm`, and `dppx` units.
2679
- Previously these conversions were inverted.
2680
-
2681
- * Don't crash when calling `str-slice()` with an `$end-at` index lower than the
2682
- `$start-at` index.
2683
-
2684
- * `str-slice()` now correctly returns `""` when `$end-at` is negative and points
2685
- before the beginning of the string.
2686
-
2687
- * Interpolation in quoted strings now properly preserves newlines.
2688
-
2689
- * Don't crash when passing only `$hue` or no keyword arguments to
2690
- `adjust-color()`, `scale-color()`, or `change-color()`.
2691
-
2692
- * Preserve escapes in identifiers. This used to only work for identifiers in
2693
- SassScript.
2694
-
2695
- * Fix a few small `@extend` bugs.
2696
-
2697
- ## 1.0.0-alpha.5
2698
-
2699
- * Fix bounds-checking for `opacify()`, `fade-in()`, `transparentize()`, and
2700
- `fade-out()`.
2701
-
2702
- * Fix a bug with `@extend` superselector calculations.
2703
-
2704
- * Fix some cases where `#{...}--` would fail to parse in selectors.
2705
-
2706
- * Allow a single number to be passed to `saturate()` for use in filter contexts.
2707
-
2708
- * Fix a bug where `**/` would fail to close a loud comment.
2709
-
2710
- * Fix a bug where mixin and function calls could set variables incorrectly.
2711
-
2712
- * Move plain CSS `@import`s to the top of the document.
2713
-
2714
- ## 1.0.0-alpha.4
2715
-
2716
- * Add support for bracketed lists.
2717
-
2718
- * Add support for Unicode ranges.
2719
-
2720
- * Add support for the Microsoft-style `=` operator.
2721
-
2722
- * Print the filename for `@debug` rules.
2723
-
2724
- * Fix a bug where `1 + - 2` and similar constructs would crash the parser.
2725
-
2726
- * Fix a bug where `@extend` produced the wrong result when used with
2727
- selector combinators.
2728
-
2729
- * Fix a bug where placeholder selectors were not allowed to be unified.
2730
-
2731
- * Fix the `mixin-exists()` function.
2732
-
2733
- * Fix `:nth-child()` and `:nth-last-child()` parsing when they contain `of
2734
- selector`.
2735
-
2736
- ## 1.0.0-alpha.3
2737
-
2738
- * Fix a bug where color equality didn't take the alpha channel into account.
2739
-
2740
- * Fix a bug with converting some RGB colors to HSL.
2741
-
2742
- * Fix a parent selector resolution bug.
2743
-
2744
- * Properly declare the arguments for `opacify()` and related functions.
2745
-
2746
- * Add a missing dependency on the `stack_trace` package.
2747
-
2748
- * Fix broken Windows archives.
2749
-
2750
- * Emit colors using their original representation if possible.
2751
-
2752
- * Emit colors without an original representation as names if possible.
2753
-
2754
- ## 1.0.0-alpha.2
2755
-
2756
- * Fix a bug where variables, functions, and mixins were broken in imported
2757
- files.
2758
-
2759
- ## 1.0.0-alpha.1
2760
-
2761
- * Initial alpha release.