905 Commits

Author SHA1 Message Date
Natalie Weizenbaum
bc4508d80d Remove a reference to Sass 4.0 in a deprecation warning 2019-06-18 17:38:55 -07:00
Natalie Weizenbaum
bea609d74b
Add a top-level warn() function for functions and importers (#711)
In addition to being useful for users of Sass, this will make it
possible for core Sass functions to produce warnings without needing
an explicit reference to the evaluator.
2019-06-06 19:42:44 +01:00
Natalie Weizenbaum
11e3749721
Merge pull request #709 from sass/analysis
Enable stricter analysis options, especially around typing
2019-05-31 17:01:13 +01:00
Natalie Weizenbaum
ac38653776 Enable strict raw types 2019-05-31 16:01:49 +01:00
Natalie Weizenbaum
79e9bbd816 Enable strict inference 2019-05-31 15:54:59 +01:00
Natalie Weizenbaum
1340ba7b8a Enable and fix (most) pedantic lints 2019-05-31 15:18:59 +01:00
Natalie Weizenbaum
2836780339
Merge pull request #689 from sass/exponent
Fix some number serialization bugs
2019-05-24 15:09:37 -07:00
Natalie Weizenbaum
0fe0208f6e Remove exponent notation for integers on Node.js
Closes #688
2019-05-21 13:36:36 -07:00
Natalie Weizenbaum
fb383de20e Fix a bug in SerializeVisitor._writeDecimal
This function didn't expect a number ending in ".0", because they're
normally filtered out by fuzzyAsInt(). However, they can make it
through for very large doubles.
2019-05-20 15:50:45 -07:00
Natalie Weizenbaum
5b9835a5bd Make SerializeVisitor._removeExponent work with non-exponent numbers
This allows us to avoid traversing the number string more times than
necessary.
2019-05-20 15:47:59 -07:00
Natalie Weizenbaum
768da7088c
Resolve imports using custom imports before load paths (#687)
Closes #681
2019-05-20 15:34:57 -07:00
Natalie Weizenbaum
db87ed2f0e
Use the new Dart 2.3.0 literal syntax (#684) 2019-05-17 18:02:12 -07:00
Natalie Weizenbaum
7c9d63a4dc Reformat with the latest formatter 2019-05-15 18:17:26 -07:00
Natalie Weizenbaum
aaebd424ed Get rid of tool/synchronize.dart
This was moved to tool/grind/synchronize.dart in #318, but the old
file never got removed.
2019-05-15 18:17:06 -07:00
Natalie Weizenbaum
c1ae142ca9 Merge remote-tracking branch 'origin/master' into merge-use 2019-05-15 12:23:42 -07:00
Natalie Weizenbaum
3b47e34c87 Fix some places where a null could sneak into a boolean condition 2019-05-08 17:19:12 -07:00
Natalie Weizenbaum
4b572f6ad5 Merge branch 'feature.use' 2019-05-08 15:38:12 -07:00
Natalie Weizenbaum
92a2c67410 Merge branch 'master' into feature.use 2019-05-06 16:40:24 -07:00
Natalie Weizenbaum
34c068a189
Generate a CSS file describing an error when one occurs (#659)
Closes #657
2019-05-02 18:14:25 -07:00
Natalie Weizenbaum
57260a9fc1
Update color algorithm URLs (#664) 2019-05-02 16:16:33 -07:00
Natalie Weizenbaum
892f301d5a
Remove a debugging print (#655)
This never actually triggered because we always overrode the listener
before the directory was modified.
2019-05-02 13:07:57 -07:00
Natalie Weizenbaum
407eefded1
Add support for attribute selector modifiers (#658)
Closes #656
2019-04-30 11:31:18 -07:00
Natalie Weizenbaum
37f0740307
Allow ! in url()s (#650)
Closes #646
2019-04-18 17:37:20 -07:00
Natalie Weizenbaum
413c949446
Make FilesystemImport._loadPath absolute (#651)
This avoids having the effective load path change when the process's
working directory changes.
2019-04-18 16:34:48 -07:00
Natalie Weizenbaum
3b3a43a8f9
Add a --charset flag and API option (#644)
The automatic @charset adding is useful in general, but there are
consistently cases where it trips up naïve downstream tools. This
option makes it easier for users to control when it occurs.
2019-04-08 14:49:08 -07:00
Natalie Weizenbaum
59800ad1f9
Don't recursively list directories in realCasePath() (#641)
We only need to list the path's immediate parent directory in order to
find its real case.

Closes #636
2019-04-04 12:18:02 -07:00
Natalie Weizenbaum
495c6f3163
Only claim "package:" URLs are unsupported on Node (#637)
Closes #630
2019-04-04 12:17:36 -07:00
Jennifer Thakar
c2c9cedb81 Extend RecursiveStatementVisitor for expressions (#639)
This adds `RecursiveAstVisitor`, which extends
`RecursiveStatementVisitor` to traverse expressions as well.
2019-04-03 14:37:27 -07:00
Natalie Weizenbaum
8c9412b520
Fix importing files relative to "package:" imports (#638)
The PackageImporter wasn't accepting paths relative to its
canonicalized outputs as inputs.

Closes #631
2019-04-03 13:57:52 -07:00
Natalie Weizenbaum
9999835df0
Add a sass.types.Error constructor to the JS API (#627)
Closes #590
2019-04-03 01:07:12 -07:00
Natalie Weizenbaum
eddf36a07e Don't copy the selector in ModifiableStyleRule.copyWithoutChildren() 2019-04-03 01:03:40 -07:00
Natalie Weizenbaum
2d1047bb36 Only clone CSS if it actually uses @extends 2019-03-30 17:47:24 -07:00
Natalie Weizenbaum
d6f319f5b4 Clone CSS after importing it 2019-03-30 17:37:30 -07:00
Natalie Weizenbaum
11c95900c8 Add a Module.cloneCss() function
This will allow us to run extends on the same module multiple times
when it's @imported or loaded via load-file().
2019-03-30 17:05:57 -07:00
Natalie Weizenbaum
eae2077d6b More thoroughly document why we duplicate visitor logic 2019-03-29 16:26:36 -07:00
Natalie Weizenbaum
5603af3d19 Include CSS for modules used by imported files 2019-03-27 14:49:52 -07:00
Natalie Weizenbaum
9f9011d9cc Load @imported CSS into an entirely new stylesheet
This will allow us to inject CSS from modules @used by an imported
stylesheet between the importer's existing CSS and the importee's new
CSS.
2019-03-27 14:49:13 -07:00
Natalie Weizenbaum
511e525619 Add a ModifiableCssVisitor
This lets us traverse a modifiable CSS tree while preserving the fact
that it's modifiable.
2019-03-22 14:09:38 -07:00
Natalie Weizenbaum
14787d86e0 Add "Css" to the visit methods for CssVisitor
This allows the same class to implement StatementVisitor and
CssVisitor.
2019-03-22 13:58:51 -07:00
Natalie Weizenbaum
bc5e3c4f8f
Properly parse CR, CR LF, and FF as newlines everywhere (#626)
Closes #623
2019-03-18 16:50:23 -07:00
Natalie Weizenbaum
cf6801ab5b Fix a typo 2019-03-13 13:30:45 -07:00
Natalie Weizenbaum
f2a34408ec Verify mandatory extensions 2019-03-12 16:53:14 -07:00
Natalie Weizenbaum
0194728f29 Mostly add support for module-scoped @extend
Verifying that a mandatory extension actually matched a real style
rule doesn't work at all.
2019-03-12 16:53:14 -07:00
Natalie Weizenbaum
c80ae01ce0 Make CssStyleRule.originalSelector modifiable-only 2019-03-12 16:53:14 -07:00
Natalie Weizenbaum
132be045f0 Merge branch 'feature.use' into merge-master 2019-03-11 18:36:27 -07:00
Natalie Weizenbaum
c98cfd53b0
Emit CSS for used modules (#620) 2019-03-11 16:49:58 -07:00
Natalie Weizenbaum
e4245a7643 Merge branch 'master' into feature.use 2019-03-10 23:31:06 -07:00
Natalie Weizenbaum
a0e63ac704 Merge branch 'feature.use' into merge-use 2019-03-07 18:17:42 -08:00
Natalie Weizenbaum
b66e1bad28
Fix some documentation issues in AsyncEnvironment (#618)
See #610
2019-03-07 18:14:44 -08:00
Natalie Weizenbaum
62bce0c5b9
Properly stringify slash-separated numbers in operations (#612)
Closes #607
2019-03-07 18:14:12 -08:00