File tree Expand file tree Collapse file tree 3 files changed +36
-6
lines changed
Expand file tree Collapse file tree 3 files changed +36
-6
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,11 @@ export default class Writing {
8282 this . nodes . parentIdSelector = moduleEl . querySelector ( '[name="parent"]' ) ;
8383 this . nodes . putAboveIdSelector = moduleEl . querySelector ( '[name="above"]' ) ;
8484 this . nodes . uriInput = moduleEl . querySelector ( '[name="uri-input"]' ) ;
85+
86+ /**
87+ * Set minimum margin left for main column to prevent editor controls from overlapping sidebar
88+ */
89+ document . documentElement . style . setProperty ( '--main-col-min-margin-left' , '50px' ) ;
8590 } ;
8691
8792 /**
Original file line number Diff line number Diff line change 9191 .tc-cell {
9292 padding : 6 px 8 px ;
9393 }
94+
95+ @media (--desktop ) {
96+ .ce-block__content ,
97+ .ce-toolbar__content {
98+ max-width : var (--layout-width-main-col );
99+ }
100+ }
94101}
95102
96103.codex-editor__redactor .ce-block:first-of-type .ce-header {
Original file line number Diff line number Diff line change 1+ :root {
2+ /**
3+ * Allows to dynamically set main column minimun margin left.
4+ * Is used for adding extra space for editor controls in page edit mode (otherwise controls overlap sidebar)
5+ */
6+ --main-col-min-margin-left : 0 px ;
7+ }
8+
19.docs {
210 min-height : calc (100 vh - var (--layout-height-header ));
311
1826 & -inner {
1927 max-width : var (--layout-width-main-col );
2028 margin : 0 auto;
29+ min-width : 0 ;
30+ width : 100 % ;
2131
2232 @media (--desktop ) {
2333 margin-left : 0 ;
2838
2939 & __content {
3040 --max-space-between-cols : 160 px ;
31-
41+ box-sizing : border-box;
3242 display : flex;
3343 justify-content : space-between;
34- max-width : calc (var (--layout-width-main-col ) + var (--max-space-between-cols ) + var (--layout-sidebar-width ));
35- margin-left : max (0 px , calc (50 vw - var (--layout-sidebar-width ) - var (--layout-width-main-col ) / 2 ));
36- margin-right : auto;
44+ padding : 20 px var (--layout-padding-horizontal );
3745
38- @media (--mobile ) {
39- padding : 20 px var (--layout-padding-horizontal );
46+ @media (--desktop ) {
47+ max-width : min (
48+ calc (var (--layout-width-main-col ) + var (--max-space-between-cols ) + var (--layout-sidebar-width )),
49+ calc (100 vw - var (--layout-sidebar-width ))
50+ );
51+ margin-left : max (var (--main-col-min-margin-left ), calc (50 vw - var (--layout-sidebar-width ) - var (--layout-width-main-col ) / 2 ) - var (--layout-padding-horizontal ));
52+ margin-right : auto;
53+ padding : 0 ;
4054 }
4155 }
4256
5569 @media (--desktop ) {
5670 display : block;
5771 }
72+
73+ &:empty {
74+ display : none;
75+ }
5876 }
5977
6078 & -sidebar {
You can’t perform that action at this time.
0 commit comments