1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-09 23:45:25 +02:00

Edit mode content width fix

This commit is contained in:
Tanya Fomina 2022-09-09 14:09:17 +03:00
parent 82e01bc656
commit 679c3400b0
3 changed files with 15 additions and 3 deletions

View file

@ -82,6 +82,11 @@ export default class Writing {
this.nodes.parentIdSelector = moduleEl.querySelector('[name="parent"]');
this.nodes.putAboveIdSelector = moduleEl.querySelector('[name="above"]');
this.nodes.uriInput = moduleEl.querySelector('[name="uri-input"]');
/**
* Set minimum margin left for main column to prevent editor controls from overlapping sidebar
*/
document.documentElement.style.setProperty('--main-col-min-margin-left', '50px');
};
/**

View file

@ -94,8 +94,11 @@
padding: 6px 8px;
}
.ce-block__content {
max-width: none;
@media (--desktop) {
.ce-block__content,
.ce-toolbar__content {
max-width: var(--layout-width-main-col);
}
}
}

View file

@ -1,3 +1,7 @@
:root {
--main-col-min-margin-left: 0px;
}
.docs {
min-height: calc(100vh - var(--layout-height-header));
@ -40,7 +44,7 @@
calc(var(--layout-width-main-col) + var(--max-space-between-cols) + var(--layout-sidebar-width)),
calc(100vw - var(--layout-sidebar-width))
);
margin-left: max(0px, calc(50vw - var(--layout-sidebar-width) - var(--layout-width-main-col) / 2) - var(--layout-padding-horizontal));
margin-left: max(var(--main-col-min-margin-left), calc(50vw - var(--layout-sidebar-width) - var(--layout-width-main-col) / 2) - var(--layout-padding-horizontal));
margin-right: auto;
padding: 0;
}