-
-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Hi! I'm currently using Custom Frames, and it's really nice. I love how it integrates with the Obsidian web viewer. However, there is one problem. I usually use the "readable page length" option, so the margins on my documents are pretty small. I like that for text, but not for embedded frames.
So I've tried to make CSS snippets, or find settings, or do anything like that, to try and get it so that the webviewer frames created by Custom Frames will successfully display as wider than the note's text margins. But for the life of me, I can't figure out how to do it. If I increase the margins on the document overall, the margins on the Custom Frame increase as well; but I'd like to keep the margins of the text the same, and only increase the margins on Custom Frames only (or tell it to ignore margins altogether).
I can do this on iframes, but not on Custom Frames. I've been able to hack something together that lets me render it how I want in Reading View, but never in Editing View.
This is the CSS snippet I have set up that lets it work the way I want (ignoring margins) in Reading view.
.custom-frames-view,
.custom-frames-view-file {
width: 80vw !important;
max-width: 100vw !important;
margin-left: calc(-40.1vw + 50%) !important;
padding: 0 !important;
overflow: visible !important;
display: flex !important;
justify-content: center;
z-index: 1;
}
But again, never works in Editing View. It does have an effect in Editing View; specifically, the Frame behaves as if it is displaying the proper width it would in Reading View, except everything outside the margins is cut off. So you can't scroll horizontally like you can if the CSS snippet is not active, for example.
Is there something I'm missing? I'm honestly nowhere near to being a developer, and I mostly just tinker with this stuff, so it's entirely possible I'm just missing an obvious solution. But I've butt my head against this for a few hours now and I still don't know what to do!
Any help would be greatly appreciated, thank you.