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

Extra line before closing CSS/SCSS rule? #181

Closed
smlombardi opened this issue Jan 8, 2015 · 6 comments
Closed

Extra line before closing CSS/SCSS rule? #181

smlombardi opened this issue Jan 8, 2015 · 6 comments
Assignees
Milestone

Comments

@smlombardi
Copy link

This sort of code"

.ttl {
  margin-bottom: 10px;
}

beautifies to this:

.ttl {
  margin-bottom: 10px;

}

There is an empty line before the closing bracket. I would rather that not be there or, if anything, add the empty line AFTER the last bracket.

Note this is the last bracket of each rule in SCSS, like so:

.ttl {
  margin-bottom: 10px !important;
  .foo {
      color: red;
     }

}

The bracket for the sub-rule is fine.

Atom 168.0, Atom Beautify 0.21.2, OS 10.10.1

@quicoto
Copy link

quicoto commented Jan 14, 2015

+1 for this.

@smlombardi
Copy link
Author

Is this acknowledged or being fixed? It's a real obstacle. Thanks.

@Glavin001
Copy link
Owner

Forward those issues to their respective maintainers and see if those are being worked on or fixed. If they are resolved let me know and I will update Atom Beautify to reflect their updates 👍. Thanks.

@Glavin001 Glavin001 self-assigned this Jan 15, 2015
@Glavin001 Glavin001 added this to the v1.0.0 milestone Jan 15, 2015
@smlombardi
Copy link
Author

They prettydiff maintainer cannot reproduce the bug. In fact, if you go to http://prettydiff.com and try this block, you'll see it works fine. Try it in Atom (.174) saved as SCSS or CSS and it happens.

.block-grid-6 > li {
  width: 16.66666%;
}

.small-block-grid-3 > li {
    width: 33.33333%;
    list-style: none;
}

.small-block-grid-3 > li:nth-of-type(1n) {
    clear: none;
}

.small-block-grid-3 > li:nth-of-type(3n+1) {
    clear: both;
}

@Glavin001
Copy link
Owner

I am away from my laptop right now however if you could submit a failing test as a pull request that would be very helpful. Look in the examples directory and follow that structure to add both test input and expected output files. 

Thanks and I'll try to take a closer look ASAP. 


Sent from Mailbox

On Sat, Jan 17, 2015 at 8:39 PM, Steve Lombardi notifications@github.com
wrote:

They prettydiff maintainer cannot reproduce the bug. In fact, if you go to http://prettydiff.com and try this block, you'll see it works fine. Try it in Atom (.174) saved as SCSS or CSS and it happens.

.block-grid-6 > li {
  width: 16.66666%;
}
.small-block-grid-3 > li {
    width: 33.33333%;
    list-style: none;
}
.small-block-grid-3 > li:nth-of-type(1n) {
    clear: none;
}
.small-block-grid-3 > li:nth-of-type(3n+1) {
    clear: both;
}

Reply to this email directly or view it on GitHub:
#181 (comment)

@Glavin001
Copy link
Owner

I'm looking into this right now. Looks like a change between 1.6.3 to 1.8.8 of Prettydiff. I am able to get it to work properly, however my unit tests are failing, so this leads me to believe that there is a new Prettydiff option or a default has changed. I'll see if I can figure it out and let you all know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants