question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Arguments spread over multiple lines

See original GitHub issue

Another issue I found is when using a function with the arguments spread over multiple lines. Not sure if this is related or I should create a new issue.

This, for example, will fail:

background-color: get-color(
  $arg1,
  $arg2
);

_Originally posted by @tvooo in https://github.com/AndyOGo/stylelint-declaration-strict-value/issues/11#issuecomment-386592198_

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
AndyOGocommented, Apr 22, 2020

@edgargressie Thank you very much to bring this to my attention again, I lost that #11 comment by @tvooo

I just released v1.2.2 🎉 Please let me know if anything isn’t working.

Edit: I also double checked the other options. And I’m considering that CSS variables and fallback values var(--foo, fallback) may be spread on multiple lines as well 🤔

1reaction
AndyOGocommented, Apr 22, 2020

@edgargressie My pleasure, you are welcome. Thank you for the report 👍

I just released a follow up patch v1.2.3 with support for multi line CSS variables 😃 And in case some JS engines don’t support the s flag for regular expressions I reverted to a more bullet proof implementation.

.foo {
  color: var(
    --color-red,
    red
  );
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Easily reformatting function arguments onto multiple lines in Vim
Inside or on brackets, type gS to split. ... this solution is for lines that include multiple template parameters (it breaks on their...
Read more >
Break calls with many arguments onto multiple lines
Break calls with many arguments onto multiple lines Follow​​ describes how to break the arguments passed to function calls that exceed the line...
Read more >
How to split the arguments of a command over multiple lines
You can type each argument in a new line, but leave no blank lines between arguments. Leaving a couple of spaces in front...
Read more >
[PSR-12] Function declarations with multiline arguments AND ...
When the argument list is split across multiple lines, the closing parenthesis and opening brace MUST be placed together on their own line...
Read more >
Manual :: Split function call on several lines
Using fluent application programming interfaces often leads to many concatenated function calls. Those calls may be split onto several lines. When doing this, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found