obsidian-repeat-plugin icon indicating copy to clipboard operation
obsidian-repeat-plugin copied to clipboard

Use maximum line width settings

Open AriesOdyssey opened this issue 2 years ago • 2 comments

Currently the plugin lets you read notes using the 'normal' line width. I set my maximum line width to a lot wider than that, so it looks weird if I use the repeat function. Can you make it so that the repeat page follows the maximum line width of my settings?

I use minimal theme settings so I don't know if that works, but I think the value should be stored somewhere for the normal theme too.

small edit for example: This is what it should look like (left one is for size comparison): image

This is what repeat renders (left one is for size comparison): image

AriesOdyssey avatar Feb 08 '23 09:02 AriesOdyssey

Hey, thanks for writing in. AFAICS there is no way for a plugin like obsidian-repeat-plugin to access user settings, so I can't implement this quite yet (see also Issue #4).

However, you can still fix this yourself. To do that, you need to override some obsidian-repeat-plugin CSS using Obsidian's CSS override system. The width of the note is controlled with the .repeat-embedded_note class, which looks like this by default:

.repeat-embedded_note {
  padding: 15px 30px;
  max-width: var(--file-line-width);
  margin-left: auto;
  margin-right: auto;
}

Go to Obsidian's settings > Appearance, then at the bottom there's a little folder icon that will open the custom CSS snippet folder. In that folder, create a file like width.css, put the following in it, and save.

repeat-embedded_note {
  padding: 15px 30px;
  margin-left: 30px;
  margin-right:	30px;
}

Then toggle it on:

image

You can of course set whatever CSS you want, like max-width: 1234px; or whatever suits you.

prncc avatar Feb 12 '23 05:02 prncc

Reopening this because I want to implement at least a separate option for this.

prncc avatar Jun 10 '23 18:06 prncc