Commit 3871c3b4 authored by Fred Chasen's avatar Fred Chasen

Merge branch 'margins_grid' into 'master'

Margins grid

See merge request !16
parents 3665f378 182a341a
Pipeline #57 canceled with stage
This diff is collapsed.
......@@ -32,10 +32,12 @@ export default `
.pagedjs_margin-top {
width: calc(var(--width) - var(--margin-left) - var(--margin-right));
height: var(--margin-top);
display: flex;
grid-column: center;
grid-row: header;
flex-wrap: nowrap;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: 100%;
}
.pagedjs_margin-top-left-corner-holder {
......@@ -62,33 +64,28 @@ export default `
width: var(--margin-right);
}
.pagedjs_margin-top > div {
flex-grow: 1;
position: relative;
}
.pagedjs_margin-right {
height: calc(var(--height) - var(--margin-top) - var(--margin-bottom));
width: var(--margin-right);
display: flex;
flex-direction: column;
right: 0;
grid-column: right;
grid-row: page;
display: grid;
grid-template-rows: repeat(3, 33.3333%);
grid-template-columns: 100%;
}
.pagedjs_margin-right > div {
flex-grow: 1;
position: relative;
}
.pagedjs_margin-bottom {
width: calc(var(--width) - var(--margin-left) - var(--margin-right));
height: var(--margin-bottom);
display: flex;
grid-column: center;
grid-row: footer;
flex-wrap: nowrap;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: 100%;
}
.pagedjs_margin-bottom-left-corner-holder {
......@@ -115,38 +112,22 @@ export default `
width: var(--margin-right);
}
.pagedjs_margin-bottom > div {
flex-grow: 1;
position: relative;
}
.pagedjs_margin-left {
height: calc(var(--height) - var(--margin-top) - var(--margin-bottom));
width: var(--margin-left);
display: flex;
flex-direction: column;
grid-column: left;
grid-row: page;
display: grid;
grid-template-rows: repeat(3, 33.33333%);
grid-template-columns: 100%;
}
.pagedjs_margin-left > div {
flex-grow: 1;
position: relative;
}
.pagedjs_page .pagedjs_margin.hasContent {
display: flex;
}
.pagedjs_page .pagedjs_margin.emptyBalance {
display: flex;
.pagedjs_pages .pagedjs_page .pagedjs_margin:not(.hasContent) {
visibility: hidden;
}
.pagedjs_page .pagedjs_margin.balanceMargins {
flex: 1 0;
}
.pagedjs_page > .pagedjs_area {
grid-column: center;
grid-row: page;
......@@ -169,16 +150,41 @@ export default `
counter-reset: pages var(--page-count);
}
.pagedjs_page .pagedjs_margin-top-left-corner,
.pagedjs_page .pagedjs_margin-top-right-corner,
.pagedjs_page .pagedjs_margin-bottom-left-corner,
.pagedjs_page .pagedjs_margin-bottom-right-corner,
.pagedjs_page .pagedjs_margin-top-left,
.pagedjs_page .pagedjs_margin-top-right,
.pagedjs_page .pagedjs_margin-bottom-left,
.pagedjs_page .pagedjs_margin-bottom-right {
height: 100%;
display: none;
.pagedjs_page .pagedjs_margin-bottom-right,
.pagedjs_page .pagedjs_margin-top-center,
.pagedjs_page .pagedjs_margin-bottom-center,
.pagedjs_page .pagedjs_margin-top-center,
.pagedjs_page .pagedjs_margin-bottom-center,
.pagedjs_margin-right-middle,
.pagedjs_margin-left-middle {
display: flex;
align-items: center;
flex: 1 1 0;
}
.pagedjs_margin-right-top,
.pagedjs_margin-left-top {
display: flex;
align-items: flex-top;
}
.pagedjs_margin-right-bottom,
.pagedjs_margin-left-bottom {
display: flex;
align-items: flex-end;
}
/*
.pagedjs_page .pagedjs_margin-top-center,
.pagedjs_page .pagedjs_margin-bottom-center {
height: 100%;
......@@ -213,6 +219,7 @@ export default `
display: none;
align-items: flex-end;
}
*/
.pagedjs_page .pagedjs_margin-top-left,
.pagedjs_page .pagedjs_margin-top-right-corner,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment