X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/f94fd44ff6920a68ba76a586c0aab038e52d6086..refs/pull/3918/head:/resources/sass/_layout.scss diff --git a/resources/sass/_layout.scss b/resources/sass/_layout.scss index 197d5271b..4c7de600b 100644 --- a/resources/sass/_layout.scss +++ b/resources/sass/_layout.scss @@ -8,6 +8,9 @@ margin-inline-end: auto; padding-inline-start: $-m; padding-inline-end: $-m; + &.medium { + max-width: 1100px; + } &.small { max-width: 840px; } @@ -23,6 +26,9 @@ display: grid; grid-column-gap: $-l; grid-row-gap: $-l; + > * { + min-width: 0; + } &.half { grid-template-columns: 1fr 1fr; } @@ -49,6 +55,9 @@ &.v-center { align-items: center; } + &.v-end { + align-items: end; + } &.no-gap { grid-row-gap: 0; grid-column-gap: 0; @@ -92,6 +101,10 @@ } } +#content { + flex: 1 0 auto; +} + /** * Flexbox layout system */ @@ -118,30 +131,134 @@ body.flexbox { position: relative; } +.flex-container-row { + display: flex; + flex-direction: row; + &.v-center { + align-items: center; + } +} + +.flex-container-column { + display: flex; + flex-direction: column; +} + +.flex-container-row.inline, .flex-container-column.inline { + display: inline-flex !important; +} + +.flex-container-column.wrap, .flex-container-row.wrap { + flex-wrap: wrap; +} + .flex { min-height: 0; flex: 1; + max-width: 100%; + &.fit-content { + flex-basis: auto; + flex-grow: 0; + } + &.fill-area { + flex-grow: 1; + flex-shrink: 0; + min-width: fit-content; + } +} + +.flex-2 { + min-height: 0; + flex: 2; + max-width: 100%; +} + +.flex-3 { + min-height: 0; + flex: 3; + max-width: 100%; +} + +.flex-none { + flex: none; +} + +.justify-flex-start { + justify-content: flex-start; +} +.justify-flex-end { + justify-content: flex-end; +} +.justify-center { + justify-content: center; +} +.justify-space-between { + justify-content: space-between; +} +.items-center { + align-items: center; +} +.items-stretch { + align-items: stretch; } +/** + * Min width utilities + */ +.min-width-xxxxs { + min-width: 60px; +} +.min-width-xxxs { + min-width: 80px; +} +.min-width-xxs { + min-width: 100px; +} +.min-width-xs { + min-width: 120px; +} +.min-width-s { + min-width: 160px; +} +.min-width-m { + min-width: 200px; +} +.min-width-l { + min-width: 240px; +} +.min-width-xl { + min-width: 280px; +} +.min-width-xxl { + min-width: 320px; +} /** * Display and float utilities */ .block { - display: block; + display: block !important; position: relative; } .inline { - display: inline; + display: inline !important; } .block.inline { - display: inline-block; + display: inline-block !important; +} + +.relative { + position: relative; } .hidden { - display: none; + display: none !important; +} + +.fill-height { + height: 100%; } .float { @@ -167,6 +284,13 @@ body.flexbox { } } +/** + * Border radiuses + */ +.rounded { + border-radius: 4px; +} + /** * Inline content columns */ @@ -184,12 +308,12 @@ body.flexbox { /** * Fixes */ -.clearfix:before, -.clearfix:after { +.clearfix::before, +.clearfix::after { content: " "; display: table; } -.clearfix:after { +.clearfix::after { clear: both; } @@ -214,6 +338,7 @@ body.flexbox { .tri-layout-middle { grid-area: b; padding-top: $-m; + min-width: 0; } } @include smaller-than($xxl) { @@ -234,13 +359,14 @@ body.flexbox { } @include larger-than($xxl) { .tri-layout-left-contents, .tri-layout-right-contents { - padding: $-m; + padding: $-xl $-m; position: sticky; - top: $-m; + top: 0; max-height: 100vh; min-height: 50vh; overflow-y: scroll; overflow-x: hidden; + height: 100%; scrollbar-width: none; -ms-overflow-style: none; &::-webkit-scrollbar { @@ -302,13 +428,13 @@ body.flexbox { display: none; } .tri-layout-left-contents > *, .tri-layout-right-contents > * { - opacity: 0.6; + @include lightDark(opacity, 0.6, 0.7); transition: opacity ease-in-out 120ms; - &:hover { - opacity: 1; + &:hover, &:focus-within { + opacity: 1 !important; } - &:focus-within { - opacity: 1; + @media (prefers-contrast: more) { + opacity: 1 !important; } }