Disable readable line length on single note

Hello Obsidian Forum,

I would like to disable the readable line length via CSS for a single note. I have searched extensively using the inspector, but unfortunately cannot find a way to do this for a specific note.

I would greatly appreciate your help.

Thanks in advance,

FuegoDiosa

You can use the property cssclasses in the preamble of that note, to give that note a specific custom class, e.g. wide-page, and then a css snippet like this:

body .wide-page { --file-line-width: 100%; }

Unfortunately, nothing changes for me when I use the Minimal Theme. It works in the Default Theme. Thanks in advance for your help. Maybe you have a solution for the Minimal Theme as well.

I’ve already tried that.

body .wide-page { --file-line-width: 100% !important; }
``

Perhaps if you are using the Style Settings or Minimal Theme Settings plugins, some of their settings are «overlapping» this CSS snippet?


No, I don’t think that’s the issue.

Please take a look at this snippet. Does it also fail to produce the desired result?

body {
	--line-width: 100%;
}

The original snippet doesn’t work because Minimal Theme seems to use its own… I don’t know what they’re called, but basically, it doesn’t use the standard --file-line-width, but instead uses its own --line-width.


For the future:

It worked.

body .wide-page {
	--line-width: 100%;
}

Thank you very much.

Are there any resources where I can read up on these CSS snippets for Obsidian?

Oh, I just saw the links, so my question is answered.

Thanks for that too.

1 Like

Minimal have their own cssclasses built-in, wide and max (as well as a few others), no css snippets needed if you’d like to use those.

https://minimal.guide/features/block-width#Helper+classes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.