Bullet alignment issue

The bullet on my theme fail to line up to the line properly:

The middle bullet is below the baseline of the text, while the top one is over it.

Any ideas about why this is happening? I tried troubleshooting the theme without much success :flushed:

Is this unique to a particular Theme or have you tried if the font has something to do with it?

I am interested on hearing what happens here.

1 Like

Itā€™s unique to my theme, which uses a specific font and some custom LESS.

But I think I got it:

item {
  paragraph-spacing-after: @base / 4;
}

It seems that adding this spacing yanks the bullet out of place, but not consistently for some reason.

Sorry if my OP was unhelpful. I had tried commenting out lines until I found it and had failed to do so sometime ago. But second timeā€™s the :four_leaf_clover:

Edit: this seems to work OK, though itā€™s not quite what I wanted:

item {
  paragraph-spacing-before: @base / 8;
  paragraph-spacing-after:  @base / 8;
}
1 Like

If you post a full theme example I can try to figure out whatā€™s happening.

I think itā€™s working as intended, as more or less.

If your entire LESS theme is this:

item {
  paragraph-spacing-after: @user-font-size / 2;
}

Then the bullet rests below the textā€™s baseline.

@jessegrosjean I have seen this in 2 themes since upgrading to 3.7. In Atom One Dark and Material the bullet aligns properly on ā€œInboxā€ but then above other projects. The bullets did align properly until 3.7 i believe.

And i see the same issue in Material:

The problem is due to the paragraph-spacing-before: 20; style. If you remove that it should align. I havenā€™t looked into the code, seems like this might be a bug, but not sure. In the end though I think my preference is to just add a manual newline in places in the document where you want extra spacing. The benefit of doing that is that the space will be their when you open your document in other text editors.

Thanks!

Hereā€™s another version of this issue.

My projects are styled like this:

item[data-type=project] {
  paragraph-spacing-before: @padding * 2;
  paragraph-spacing-after: @padding * 2;
}

Because the spacing is the same before and after the line, the handle stays where it should. Iā€™ve made my peace with this, and re-designed my styles accordingly.

However, when I focus on a project, the paragraph-spacing-before value is disregarded, so that the handle gets thrown out of line again.

Itā€™s a minor detail, but I thought Iā€™d bring it up.

Iā€™m pretty sure this is a feature/problem with the way that underlying NSTextView renders attributed strings. Paragraph spacing is ignored if those is no other paragraph on the other side of that spacing. Longer termā€¦ now that Iā€™m writing my own text engine and own text layout code this will be easy enough to address ā€¦ though iā€™m not yet to the point where Iā€™m actually working on it. But down the road when I start integrating the new text engine bring this up again and I should be able to solve.

Alright. In the meantime, is there a way to target with a style the first project in a view?

Sorry I donā€™t think so.

1 Like

Originally I thought the same until I used the SideBar to rearrange my projects. The spacing gets screwed up when you move projects around. The space underneath a project doesnā€™t move with it. After moving a project you are left with no space at the top and two spaces are left where the project was. Hoping for this to be fixed some day. either moving the space when arranging the side bar or the css/less fix. ā€“ Thanks.