Commit Graph

1402 Commits

Author SHA1 Message Date
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
e4e3bdbfd2
Merge pull request #619 from sass/merge-master
Merge branch 'master' into feature.use
2019-03-11 18:37:48 -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
6c7612ba75
Merge branch 'feature.use' into master 2019-03-08 13:13:38 -08: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
Natalie Weizenbaum
e84c8b1995
Don't put style rules inside empty @keyframes rules (#613)
Closes #611
2019-03-07 17:04:30 -08:00
Natalie Weizenbaum
284f4ef7dd
Make .scss and .sass take precedence over .css in @use (#609)
See sass/language#68
2019-03-04 18:47:57 -08:00
Anthony Sottile
7249698cac https-ify sass-lang.com urls (#614)
See https://github.com/sass/sass-site/issues/217

Committed via https://github.com/asottile/all-repos
2019-03-04 16:38:55 -08:00
Natalie Weizenbaum
812a9a5672
Merge pull request #603 from sass/use-members
Add support for loading modules and using members from them
2019-02-26 13:03:24 -08:00
Natalie Weizenbaum
b59b86304d Ensure that global variables are always module members
See sass/language#50
2019-02-22 18:03:24 -08:00
Natalie Weizenbaum
0929aa5ce2
Update pub credentials (#605)
Pub recently started requiring more OAuth2 scopes than our old
credentials held.
2019-02-22 15:53:44 -08:00
Natalie Weizenbaum
8ab9ce1141
Deprecate assignment to non-existent global variables (#601)
See #600
See sass/sass#2606
2019-02-21 15:16:52 -08:00
Natalie Weizenbaum
6d6974c50e Add the ability to refer to members from other modules 2019-02-21 00:30:04 -08:00
Natalie Weizenbaum
7a7aea95b3 Add a module class and a way to create it from an Environment 2019-02-21 00:30:04 -08:00
Natalie Weizenbaum
5d4db9eb17 Merge branch 'master' into 'feature.use' 2019-02-21 00:29:59 -08:00
Natalie Weizenbaum
149bf85b4d
Explicitly mark classes as sealed (#602) 2019-02-20 16:39:46 -08:00
Natalie Weizenbaum
26401fb135
Fix an attribute selector quoting bug (#599)
Closes #598
2019-02-20 13:38:21 -08:00
Jennifer Thakar
b22ae51955 Fix bug in RecursiveStatementVisitor (#596)
The value of an `AtRule` can be null, so it should not be visited in that case.

Ran across this issue when I attempted to run the module migrator on a stylesheet containing `@font-face` (which has children, but no value).
2019-02-15 13:53:17 -08:00
Natalie Weizenbaum
89f12c3c67 Merge branch 'master' into feature.use 2019-02-13 14:57:05 -08:00
Natalie Weizenbaum
4c7b6cc0e5
Merge pull request #593 from sass/merge-use
Merge branch 'feature.use' into master
2019-02-13 14:56:17 -08:00
Natalie Weizenbaum
e3a5eed4da Revert "Run tests against sass-spec's feature.use branch"
This reverts commit 4d23acd119.
2019-02-13 13:59:44 -08:00
Natalie Weizenbaum
776e2bfcc2 Disable @use parsing 2019-02-13 00:36:36 -08:00
Natalie Weizenbaum
96510f2a1e
Merge pull request #592 from sass/use.syntax
Add support for parsing @use
2019-02-13 00:28:41 -08:00
Natalie Weizenbaum
4b10c22bd4 Add more explanatory error messages 2019-02-13 00:02:42 -08:00
Natalie Weizenbaum
6354cdd02a Don't parse private module member references 2019-02-11 17:17:31 -08:00
Natalie Weizenbaum
d757d99569 Add support for parsing @use 2019-02-11 17:17:31 -08:00
Natalie Weizenbaum
4d23acd119 Run tests against sass-spec's feature.use branch 2019-02-11 17:17:31 -08:00
Natalie Weizenbaum
7ca989a4f7
Produce a better error for invalid function contents (#587)
Closes #584
2019-02-04 13:14:25 -08:00
Natalie Weizenbaum
a81017275a
Produce a better error message for unclosed style rules (#586)
Closes #577
2019-02-01 17:21:15 -08:00
Natalie Weizenbaum
b102dc496a
Allow individual directories to be passed on the command-line (#581)
Closes #543
2019-02-01 14:59:58 -08:00
Natalie Weizenbaum
cd3b82e2be
Fix a check for adjusting parse errors (#582) 2019-02-01 14:55:34 -08:00
Natalie Weizenbaum
e8ac314f56
Support dart-lang/source_span#25 (#566)
This adds a --no-unicode option to disable Unicode span rendering,
decouples repl highlighting from SourceSpan.highlight, and updates
tests to work with the new error highlighting.

It also tightly scopes source spans for statements with children.
Previously, source spans for these nodes extended all the way through
any whitespace that followed the node. This led to messy-looking
multiline span highlights with dart-lang/source_span#25.

Now, StylesheetParser.children doesn't consume trailing whitespace.
Instead, we add a helper method StylesheetParser._withChildren that
parses children, creates the appropriate span, and then consumes the
trailing whitespace.
2019-01-28 20:42:32 -05:00
Matt Felten
923615a7f8 Fix "compound selectors may *no* longer be extended" error message (#576) 2019-01-25 20:52:05 -05:00
Natalie Weizenbaum
d1fcdbec75
Merge pull request #578 from sass/css-refactor
Split the CSS AST into mutable and immutable variants
2019-01-25 17:24:49 -05:00
Natalie Weizenbaum
d3c3a3d515 Delete ModifiableCssNode.modifyChildren
Instead of doing this, we now construct a new (unmodifiable)
CssStylesheet if additional imports need to be added.
2019-01-24 16:25:37 -08:00
Natalie Weizenbaum
93f4876b28 Split the CSS AST into mutable and immutable variants
This codifies in types the constraint that only the evaluator should
modify CSS nodes. It also makes it possible to create non-mutable
classes that don't need to care about stuff like tracking parent nodes.
2019-01-24 15:59:39 -08:00
Natalie Weizenbaum
9fdf5612ea
Fix a performance bug in BinaryOperatorExpression.span (#569)
Previously, evaluator called BinaryOperationExpression.span for each
binary operation it evaluated, which in turn called spanForList() to
create a span covering both child expressions. spanForList() then
called .span for both the left and right child operations *twice*,
leading to exponential behavior.

This is now avoided in three complementary ways:

1. The evaluator avoids eagerly calling AstNode.span, instead keeping
   the original AstNode until the span itself needs to be accessed.
   This means that a span will only be accessed when an error actually
   occurs, and then only one operation's span will be accessed.

2. BinaryOperationExpression.span now iterates through any child
   operations before calling their .span methods, so it only performs
   O(1) allocations.

3. spanForList() now only calls each AstNode.span once.
2019-01-17 18:04:14 -05:00
Natalie Weizenbaum
b0242767ee
Temporarily limit source_span to 1.4.x (#570)
Getting all the tests update and the output looking nice is proving
more difficult than expected, and I want to unblock other pull
requests for Dart Sass in the meantime.
2019-01-15 03:02:06 -05:00
Natalie Weizenbaum
3368e890cd
Add a grind script to sanity-check a release (#563)
Add a grind script to sanity-check a release

This will help avoid accidentally releasing dev versions 😖.
2019-01-09 19:45:27 -05:00
Natalie Weizenbaum
e3ae4705f1
Release 1.16.0 (#562) 2019-01-09 19:18:45 -05: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
12f53f5e1c
Release 1.15.3 (#561) 2019-01-04 15:32:45 -05:00
Natalie Weizenbaum
32be730b6e
Emit tab characters as \9 (#553)
Closes #552
2019-01-04 14:20:28 -05:00