-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests for the indented syntax #2034
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5cf5060
Add Indented syntax tests
jamesnw 644da98
Merge indented syntax into other examples
jamesnw 1262f3f
Test block and semicolon in indented
jamesnw a1a45cc
Fix tests
jamesnw 46b628c
Make conformant, add sass to path
jamesnw c8fb383
Rename indented to sass
jamesnw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,101 @@ | ||
<===> input.scss | ||
.trailing-whitespace { | ||
--space: value ; | ||
--tab: value ; | ||
--newline: value | ||
<===> scss/space/input.scss | ||
a { | ||
--b: c ; | ||
} | ||
|
||
<===> scss/space/output.css | ||
a { | ||
--b: c ; | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> scss/tab/input.scss | ||
a { | ||
--b: c ; | ||
} | ||
|
||
<===> scss/tab/output.css | ||
a { | ||
--b: c ; | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> scss/newline/input.scss | ||
a { | ||
--b: c | ||
; | ||
--before-closing-brace: value | ||
} | ||
|
||
<===> output.css | ||
.trailing-whitespace { | ||
--space: value ; | ||
--tab: value ; | ||
--newline: value ; | ||
--before-closing-brace: value ; | ||
<===> scss/newline/output.css | ||
a { | ||
--b: c ; | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> scss/before-closing-brace/input.scss | ||
a { | ||
--b: c | ||
} | ||
|
||
<===> scss/before-closing-brace/output.css | ||
a { | ||
--b: c ; | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> sass/space/input.sass | ||
a | ||
--b: c | ||
|
||
<===> sass/space/output.css | ||
a { | ||
--b: c; | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> sass/tab/input.sass | ||
a | ||
--b: c | ||
|
||
<===> sass/tab/output.css | ||
a { | ||
--b: c; | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> sass/newline/input.sass | ||
a | ||
--b: c | ||
|
||
--d: e | ||
|
||
|
||
<===> sass/newline/output.css | ||
a { | ||
--b: c; | ||
--d: e; | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> sass/before-block-end/input.sass | ||
a | ||
--b: c | ||
|
||
d | ||
--e: f | ||
|
||
<===> sass/before-block-end/output.css | ||
a { | ||
--b: c; | ||
} | ||
|
||
d { | ||
--e: f; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this behavior currently differs between the syntaxes- in a custom property, trailing whitespace is removed in Indented and condensed in Scss (see line 20).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a design conflict here between "trailing whitespace in custom property values is observable in CSS" and "end-of-line trailing whitespaces is invisible and generally shouldn't matter", complicated further by the fact that custom property trailing whitespace nearly never matters in practice. I think given that we're planning to allow
--b: c ;
in the indented syntax eventually anyway, preserving the existing behavior is probably the right way forward.