Skip to content
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

Block rules need to contend with single-multi line distinction #72

Closed
davidtheclark opened this issue May 16, 2015 · 6 comments
Closed
Labels
type: enhancement a new feature that isn't related to rules
Milestone

Comments

@davidtheclark
Copy link
Contributor

I'm pretty sure that's not being considered yet.

@davidtheclark davidtheclark added the type: enhancement a new feature that isn't related to rules label May 16, 2015
@davidtheclark
Copy link
Contributor Author

Agh. This single/multi-line stuff is running into some complications.

  1. For each relevant rule we'll have to define what determines that its applicable CSS is single- or multi-line. For example, is this a\n{ color: pink; } a single- or a multi-line block? How about this a {\n color:pink; background: orange;\n}?
  2. Then, we will run into the situation where certain permutations of standard options don't make sense. block-opening-brace-newline, for instance --- does it just not accept the single-line options for "after", because anytime a newline is present within the braces the block is multi-line? (Dependent on Rules #1)

@MoOx
Copy link
Contributor

MoOx commented May 16, 2015

From what I know about eslint, single line is when the entire block (for eslint: object) on a single line: { ... }. As soon as there is a newline somewhere, we should switch to multilines.
I have to admit that the case of the selector is kind of tricky. I think we should only consider single/multi for the block it self (braces + content inside).

@davidtheclark
Copy link
Contributor Author

Yeah, I was thinking that, too. So we're in agreement about 1 above.

After #73 changes are implemented I think that 2 above has a straightforward solution: the block-opening-brace-newline-after simply doesn't accept *-single-line or *-multi-line keywords, only accepts always|never.

@MoOx
Copy link
Contributor

MoOx commented May 16, 2015

lgtm

@jeddy3
Copy link
Member

jeddy3 commented May 17, 2015

The solutions to 1 and 2 both LGTM :)

@jeddy3 jeddy3 added this to the 0.1.0 milestone May 17, 2015
@davidtheclark
Copy link
Contributor Author

As of bbea328 this is finished for block-opening-brace-space-*. Newline needs to be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement a new feature that isn't related to rules
Development

No branches or pull requests

3 participants