forgecrafted / rulerz

[Looking for maintainer] A simple Atom package to mark your cursor position with a ruler.
MIT License
6 stars 7 forks source link

Enhancement: Disable rulerz for first character in line #16

Closed tairun closed 8 years ago

tairun commented 8 years ago

When the cursor sits on the first character of the line, the ruler clashes with the right border of the gutter, which looks awkward. I don't know how to style this with css and think this should be easier to implement functionally.

This :-( image

as oposed to this: image

cmtonkinson commented 8 years ago

Which Atom/Syntax Themes are you using? I don't see any combination which creates a visible right border on the gutter.

no-gutter-border

tairun commented 8 years ago

I'm using One Dark UI (Compact) and Base16 Tomorrow for Syntax. I have linter installed which adds a second gutter by default. But disabling the package didn't do any good.

n3dst4 commented 8 years ago

So I've just tried, and it's Base 16 Tomorrow that adds the right border on the gutters.

Could I suggest this snippet of custom CSS which you could put in your user stylesheet to remove that border?

.gutter {
  border-right-style: none;
}

2015-10-25 16_29_28-styles less - c__git_ssln-scaffold - atom

cmtonkinson commented 8 years ago

We could disable the gutter border in the package styles, but that seems a bit scorched-earth.

Another approach could be to disable the gutter specifically for Base16 Tomorrow. I'm not sure whether this is per an Atom specification or just a convention (I've never played with Atom Themes before), but each Theme (Atom and Syntax alike) seem to be adding a class to the outtermost <atom-workspace>. Case and point, I see a theme-base16-tomorrow-dark-theme class which would be trivially targetable.

In any event, I'm not sure it's wise to add actual logic specific to Theme variations.

Thoughts?


@tairun Until we get this sorted out, @n3dst4's workaround is your best bet.

tairun commented 8 years ago

In any event, I'm not sure it's wise to add actual logic specific to Theme variations.

I agree, maintaining a "database" with "bad" themes would be tedious.

@n3dst4 solution is fine with me for the moment. By the way, for my installation (windows @1.0.19) the correct css selector is atom-text-editor::shadow .gutter (Don't know if that's standard for you guys) :+1:

I enabled the "highlight error lines in gutter" option from the linter package again and it does some weird stuff. image (highlight on right, right-border none)

image (highlight on left, right-border none)

image (highlight on left, left-border none)

What I'm trying to say is, there seems to be no way to style the middle border.

tairun commented 8 years ago

What I'm trying to say is, there seems to be no way to style the middle border.

Ok, did some quick testing and got it "right". Really specific selector from dev tools (I know this might be different for everyone. Depends on themes and packages installed):

atom-text-editor::shadow div > div > div.gutter-container > div:nth-child(2) {
   border-left-style: none;
}

image

tairun commented 8 years ago

By the way I realize this is not this packages fault. But there might be a solution from the core devs:

  • Base16 Tomorrow themes have now a seamless gutter and other minor fixes.

News on update page: https://atom.io/releases

cmtonkinson commented 8 years ago

Since you've got a workaround (and I read the 1.1 beta release notes the same way you do - that they're removing the extra gutter border anyway) is it safe to close?

tairun commented 8 years ago

I think yes, go ahead.