Natalie Weizenbaum
66cb55c76f
Avoid throw/catch in Number.== ( #1188 )
...
Throwing and catching exceptions is expensive. Testing this on one
user's number-heavy codebase resulted in a 2x speed improvement.
2021-01-11 13:41:37 -08:00
Natalie Weizenbaum
bae2968757
Deprecate incorrect HSL units
...
Partially addresses #1174
2020-12-29 13:26:54 -08:00
Natalie Weizenbaum
f9a9373547
Print the LHS first in incompatible unit errors
...
Closes #766
2020-12-28 18:06:59 -08:00
Natalie Weizenbaum
d532f015f6
Improve error reporting for incompatible units
...
The new messages more consistently include argument names and actual
values. Errors about mixed unitless and unitful numbers are now more
consistent.
2020-12-28 17:58:55 -08:00
Natalie Weizenbaum
02c92aa7cd
Add support for clamp() as a special math function ( #1168 )
...
Closes #1146
See sass/sass#2860
2020-12-28 13:42:04 -08:00
Natalie Weizenbaum
f798aae0af
Reformat ( #1133 )
2020-11-03 16:03:08 -08:00
Natalie Weizenbaum
b0f213c22f
Merge remote-tracking branch 'origin/master' into feature.hwb
2020-10-09 17:29:47 -07:00
Natalie Weizenbaum
1918674295
Support HWB colors in SassColor ( #1085 )
...
See sass/sass#2835
2020-09-17 16:18:12 -07:00
Natalie Weizenbaum
028b2f6a01
Add a map.deep-merge() function ( #1077 ) ( #1080 )
...
This also adds a Value.tryMap() function, which was useful for
implementing this and may be more generally useful to users as well.
See sass/sass#2836
See sass/sass-spec#1560
2020-09-15 16:25:49 -07:00
Natalie Weizenbaum
015a76cf0b
Revert "Add a map.deep-merge() function ( #1077 ) ( #1080 )"
...
This reverts commit 315e86b442
.
Once again, this was supposed to go on feature.nested-maps.
2020-09-15 16:24:53 -07:00
Natalie Weizenbaum
315e86b442
Add a map.deep-merge() function ( #1077 ) ( #1080 )
...
This also adds a Value.tryMap() function, which was useful for
implementing this and may be more generally useful to users as well.
See sass/sass#2836
See sass/sass-spec#1560
2020-09-15 16:23:01 -07:00
Natalie Weizenbaum
9503b57ac5
Revert "Add a map.deep-merge() function ( #1077 )"
...
This reverts commit bc7216a441
.
This was intended to land on a feature branch, not on master.
2020-09-15 15:17:55 -07:00
Natalie Weizenbaum
bc7216a441
Add a map.deep-merge() function ( #1077 )
...
This also adds a Value.tryMap() function, which was useful for
implementing this and may be more generally useful to users as well.
See sass/sass#2836
See sass/sass-spec#1560
2020-09-15 13:03:38 -07:00
Natalie Weizenbaum
64cc529421
Reformat
2019-12-18 17:00:19 -08:00
Natalie Weizenbaum
ec3d0ddc19
Fix new pedantic lints
2019-12-18 15:46:36 -08:00
Natalie Weizenbaum
3ec2f3faaa
Fix a documentation typo ( #889 )
2019-11-20 16:25:37 -08:00
Natalie Weizenbaum
20978e0320
Fix new strict inference hints from Dart 2.6
2019-11-06 14:47:24 -08:00
Natalie Weizenbaum
8d5e3d9a67
Include argument names when reporting range errors
...
Closes #771
2019-07-25 08:37:00 +01:00
Natalie Weizenbaum
c794abd858
Eagerly dash-normalize Sass identifiers
...
This avoids using maps and sets with custom equality, which are
moderately inefficient relative to built-in maps and sets on both Node
and the Dart VM. In order to make error messages continue to use the
original identifiers where possible, this updates some of them to rely
more heavily on their associated source spans for context.
2019-07-16 19:42:38 -07:00
Natalie Weizenbaum
47e0cfc8c8
Empty maps have undecided separators
...
Closes #737
2019-07-03 15:31:56 -07:00
Natalie Weizenbaum
4716349a0e
Add new module-system features for existing functions ( #720 )
2019-06-18 12:03:12 -07:00
Natalie Weizenbaum
79e9bbd816
Enable strict inference
2019-05-31 15:54:59 +01:00
Natalie Weizenbaum
57260a9fc1
Update color algorithm URLs ( #664 )
2019-05-02 16:16:33 -07:00
Natalie Weizenbaum
149bf85b4d
Explicitly mark classes as sealed ( #602 )
2019-02-20 16:39:46 -08:00
Natalie Weizenbaum
55ebe56d3c
Add support for new special number strings ( #556 )
...
See sass/sass#2584
2019-01-09 15:50:04 -05:00
Natalie Weizenbaum
487e5025ff
Reformat with Dart-2-only features
2018-11-15 15:16:24 -08:00
Natalie Weizenbaum
e0c328576b
Track slash-separated numbers as numbers rather than strings
...
This will allow us to refer to them as numbers in functions that use
the slash as an argument separator.
2018-11-12 14:49:24 -08:00
Sam Rawlins
54192ee815
Fix a new missing_return error in Dart 2.1.0-dev.0.0 ( #445 )
2018-08-14 13:11:21 -07:00
Natalie Weizenbaum
023bf91745
Add deprecation warnings for hex alpha colors ( #367 )
...
Also support unambiguous hex alpha colors.
Closes #360
See sass/sass#2179
2018-06-21 17:47:06 -07:00
Natalie Weizenbaum
b949f9fe72
Use Dart 2 constants
2018-06-15 13:59:28 -07:00
Natalie Weizenbaum
a31a147dd6
Stop using Delegating*.typed()
2018-06-14 16:15:27 -07:00
Natalie Weizenbaum
5cce76b6d4
Use constants from dart2_constants ( #282 )
2018-04-04 15:49:07 -07:00
Natalie Weizenbaum
9d3c8cdc1e
Allow mod 0 ( #255 )
...
Closes #254
2018-03-16 13:39:21 -07:00
Natalie Weizenbaum
f1e58e083e
Make SassList.contents private ( #227 )
...
This forces users to use Value.asList, which encourages them to be
aware that every value counts as a list.
2018-02-02 17:36:29 -08:00
Natalie Weizenbaum
a7ca1e0055
new SassString() defaults to quoted
...
We encourage API users to produce quoted strings when in doubt, so our
API should match that behavior.
2018-02-02 16:49:23 -08:00
Natalie Weizenbaum
9240f372aa
Fix a unit division bug
2018-01-23 12:51:33 -08:00
Natalie Weizenbaum
921e1fa204
Fix a unit optimization bug
2018-01-23 12:45:25 -08:00
Natalie Weizenbaum
123fe55017
Add SassString index helpers
...
We aren't using these in our own functions because, for
backwards-compatibility, these functions don't throw errors for
invalid indices.
2018-01-14 16:04:46 -08:00
Natalie Weizenbaum
9d207b13ec
SassNumber.assertIndexFor() -> Value.sassIndexToListIndex() ( #211 )
2018-01-14 13:38:43 -08:00
Natalie Weizenbaum
1e09cec5aa
Split Value and its subtypes into public and private interfaces ( #210 )
2018-01-13 01:30:42 -08:00
Natalie Weizenbaum
e5af175b55
Fix a couple number hashing bugs
2018-01-13 00:34:54 -08:00
Natalie Weizenbaum
b5a838c9c5
Improve callable and value documentation
...
This documentation now targets external users, since these are part of
the public API.
2018-01-13 00:34:54 -08:00
Natalie Weizenbaum
aa3c765b10
Allow var() in place of multiple arguments to color functions ( #208 )
...
See sass/sass#2440
2018-01-12 11:43:36 -08:00
Natalie Weizenbaum
74400dc4a4
Add asynchronous versions of several evaluation-related libraries
...
This allows us to support asynchronous importers and, eventually,
functions without breaking synchronous support. The copies were made
manually, but the eventual plan is to auto-generate the synchronous
versions by stripping all asynchrony from the async versions.
See #9
2017-12-01 14:29:11 -08:00
Sam Rawlins
3b6f5ec3a0
Add a separator character to ListSeparator ( #133 )
2017-05-25 12:56:12 -07:00
Natalie Weizenbaum
7248cf0e27
Use real generic method syntax.
2017-05-18 17:11:32 -07:00
Natalie Weizenbaum
79261fee8e
Add boolean short-circuiting.
2017-02-03 17:37:54 -08:00
Natalie Weizenbaum
4b614166ca
Fix numbers divided by colors.
2017-01-26 20:08:49 -08:00
Natalie Weizenbaum
04570bf828
Warn about named colors in interpolation.
2017-01-15 12:30:50 -08:00
Natalie Weizenbaum
2d28194e4c
Fix %.
2017-01-14 22:54:13 -08:00