Scope custom settings content styling to the items themselves
The License section on the Advanced settings page laid its two paragraphs
out side-by-side instead of stacked. The cause is the scope of the
stylesheet, not the markup: every rule in styles.css was scoped to
div.obsidian-local-rest-api-settings, a class added only to the settings
tab's containerEl, but a `type: "page"` item renders into its own
SettingPage container, which is not a descendant of containerEl. Nothing
in the plugin's stylesheet reached the Certificates or Advanced settings
pages at all, so `display: block` never overrode .setting-item's flex row
and the paragraphs became flex items.
Adds prepareCustomContent(), which empties a setting item and tags it
with .obsidian-local-rest-api-content, replacing the empty() +
addClass("full-width-setting") pair repeated at the three custom-render
sites. Every rule for plugin-rendered content is re-scoped to that class,
so it travels with the content instead of depending on an ancestor that
sub-pages do not have. This also restores the certificate warning
borders, paragraph padding, and connection-URL table styling on the
Certificates page, which had been silently dropped for the same reason.
Two rules stay scoped to the tab root because they target
framework-rendered controls that cannot be given a class of our own. One
of them, the textarea width, consequently no longer reaches the
certificate and key textareas now that they live on the Certificates
page; those keep the framework's own sizing, since matching them would
require a selector broad enough to restyle every other plugin's
settings. Noted in a comment rather than fixed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> A
Adam Coddington committed
caef5cb70e0a142f3913d2398fcce578ac7cfcf1
Parent: 33d7bee