-
Notifications
You must be signed in to change notification settings - Fork 91
Add tests for plain-CSS @function
#2087
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
063bd2a
Add tests for plain-CSS `@function` and `@mixin`
nex3 268a767
Drop mixin tests for now
nex3 4e8cbe6
Poke CI
nex3 adabf6b
Fix plain CSS tests
nex3 690f608
Add more tests
nex3 82125e0
Add an error tests for plain-CSS mixins
nex3 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,309 @@ | ||
| <===> lowercase/parameter/input.scss | ||
| @function --a(--b <color>) {result: c} | ||
|
|
||
| <===> lowercase/parameter/output.css | ||
| @function --a(--b <color>) { | ||
| result: c; | ||
| } | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> lowercase/returns/input.scss | ||
| @function --a() returns <ident> {result: b} | ||
|
|
||
| <===> lowercase/returns/output.css | ||
| @function --a() returns <ident> { | ||
| result: b; | ||
| } | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> lowercase/interpolation/input.scss | ||
| @function --#{a}() {result: b} | ||
|
|
||
| <===> lowercase/interpolation/output.css | ||
| @function --a() { | ||
| result: b; | ||
| } | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> lowercase/result/sass_script/input.scss | ||
| @function --a() { | ||
| result: $b; | ||
| } | ||
|
|
||
| <===> lowercase/result/sass_script/output.css | ||
| @function --a() { | ||
| result: $b; | ||
| } | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> lowercase/result/characters/input.scss | ||
| @function --a() { | ||
| result: {}#&%^*; | ||
| } | ||
|
|
||
| <===> lowercase/result/characters/output.css | ||
| @function --a() { | ||
| result: {}#&%^*; | ||
| } | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> lowercase/result/interpolation/input.scss | ||
| @function --a() { | ||
| result: #{1 + 1}; | ||
| } | ||
|
|
||
| <===> lowercase/result/interpolation/output.css | ||
| @function --a() { | ||
| result: 2; | ||
| } | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> uppercase/result/sass_script/input.scss | ||
| @FUNCTION --a() { | ||
| result: $b; | ||
| } | ||
|
|
||
| <===> uppercase/result/sass_script/output.css | ||
| @FUNCTION --a() { | ||
| result: $b; | ||
| } | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> uppercase/result/characters/input.scss | ||
| @FUNCTION --a() { | ||
| result: {}#&%^*; | ||
| } | ||
|
|
||
| <===> uppercase/result/characters/output.css | ||
| @FUNCTION --a() { | ||
| result: {}#&%^*; | ||
| } | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> uppercase/result/interpolation/input.scss | ||
| @FUNCTION --a() { | ||
| result: #{1 + 1}; | ||
| } | ||
|
|
||
| <===> uppercase/result/interpolation/output.css | ||
| @FUNCTION --a() { | ||
| result: 2; | ||
| } | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> uppercase/result/nesting/input.scss | ||
| @function --a() { | ||
| RESULT: {b: c}; | ||
| } | ||
|
|
||
| <===> uppercase/result/nesting/output.css | ||
| @function --a() { | ||
| RESULT: {b: c}; | ||
| } | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> interpolated/result/sass_script/input.scss | ||
| @#{function} --a() { | ||
| result: 1 + 1; | ||
| } | ||
|
|
||
| <===> interpolated/result/sass_script/output.css | ||
| @function --a() { | ||
| result: 2; | ||
| } | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> interpolated/result/nested/input.sass | ||
| @function --a() | ||
| #{result}: | ||
| b: c | ||
|
|
||
| <===> interpolated/result/nested/output.css | ||
| @function --a() { | ||
| result-b: c; | ||
| } | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> result/uppercase/sass_script/input.scss | ||
| @function --a() { | ||
| RESULT: $b; | ||
| } | ||
|
|
||
| <===> result/uppercase/sass_script/output.css | ||
| @function --a() { | ||
| RESULT: $b; | ||
| } | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> result/uppercase/characters/input.scss | ||
| @function --a() { | ||
| RESULT: {}#&%^*; | ||
| } | ||
|
|
||
| <===> result/uppercase/characters/output.css | ||
| @function --a() { | ||
| RESULT: {}#&%^*; | ||
| } | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> result/uppercase/interpolation/input.scss | ||
| @function --a() { | ||
| RESULT: #{1 + 1}; | ||
| } | ||
|
|
||
| <===> result/uppercase/interpolation/output.css | ||
| @function --a() { | ||
| RESULT: 2; | ||
| } | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> result/interpolated/sass_script/input.scss | ||
| @function --a() { | ||
| #{result}: 1 + 1; | ||
| } | ||
|
|
||
| <===> result/interpolated/sass_script/output.css | ||
| @function --a() { | ||
| result: 2; | ||
| } | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> result/interpolated/nested/input.sass | ||
| @function --a() | ||
| #{result}: | ||
| b: c | ||
|
|
||
| <===> result/interpolated/nested/output.css | ||
| @function --a() { | ||
| result-b: c; | ||
| } | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> result/style_rule/sass_script/input.scss | ||
| .a { | ||
| result: 1 + 1; | ||
| } | ||
|
|
||
| <===> result/style_rule/sass_script/output.css | ||
| .a { | ||
| result: 2; | ||
| } | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> result/style_rule/interpolation/input.scss | ||
| .a { | ||
| result: #{1 + 1}; | ||
| } | ||
|
|
||
| <===> result/style_rule/interpolation/output.css | ||
| .a { | ||
| result: 2; | ||
| } | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> error/lowercase/result/nested/input.sass | ||
| @function --a() | ||
| result: | ||
| b: c | ||
|
|
||
| <===> error/lowercase/result/nested/error | ||
| Error: Nothing may be indented beneath a @function result. | ||
| , | ||
| 3 | b: c | ||
| | ^ | ||
| ' | ||
| input.sass 3:5 root stylesheet | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> error/uppercase/result/nested/input.sass | ||
| @FUNCTION --a() | ||
| result: | ||
| b: c | ||
|
|
||
| <===> error/uppercase/result/nested/error | ||
| Error: Nothing may be indented beneath a @function result. | ||
| , | ||
| 3 | b: c | ||
| | ^ | ||
| ' | ||
| input.sass 3:5 root stylesheet | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> error/interpolated/result/characters/input.scss | ||
| @#{function} --a() { | ||
| result: {}#&%^*; | ||
| } | ||
|
|
||
| <===> error/interpolated/result/characters/error | ||
| Error: expected "{". | ||
| , | ||
| 2 | result: {}#&%^*; | ||
| | ^ | ||
| ' | ||
| input.scss 2:18 root stylesheet | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> error/result/uppercase/nested/input.sass | ||
| @function --a() | ||
| RESULT: | ||
| b: c | ||
|
|
||
| <===> error/result/uppercase/nested/error | ||
| Error: Nothing may be indented beneath a @function result. | ||
| , | ||
| 3 | b: c | ||
| | ^ | ||
| ' | ||
| input.sass 3:5 root stylesheet | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> error/result/interpolated/characters/input.scss | ||
| @function --a() { | ||
| #{result}: {}#&%^*; | ||
| } | ||
|
|
||
| <===> error/result/interpolated/characters/error | ||
| Error: expected "{". | ||
| , | ||
| 2 | #{result}: {}#&%^*; | ||
| | ^ | ||
| ' | ||
| input.scss 2:21 root stylesheet | ||
|
|
||
| <===> | ||
| ================================================================================ | ||
| <===> error/result/style_rule/characters/input.scss | ||
| .a { | ||
| result: {}#&%^*; | ||
| } | ||
|
|
||
| <===> error/result/style_rule/characters/error | ||
| Error: expected "{". | ||
| , | ||
| 2 | result: {}#&%^*; | ||
| | ^ | ||
| ' | ||
| input.scss 2:18 root stylesheet | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <===> error/css/mixin/input.scss | ||
| @mixin --a {} | ||
|
|
||
| <===> error/css/mixin/error | ||
| Error: Sass @mixin names beginning with -- are forbidden for forward-compatibility with plain CSS mixins. | ||
|
|
||
| For details, see https://sass-lang.com/d/css-function-mixin | ||
| , | ||
| 1 | @mixin --a {} | ||
| | ^^^ | ||
| ' | ||
| input.scss 1:8 root stylesheet |
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.
Uh oh!
There was an error while loading. Please reload this page.