X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/78bf044a7acf39dfc91588099435cd27038b61b2..refs/pull/3433/head:/resources/sass/_layout.scss diff --git a/resources/sass/_layout.scss b/resources/sass/_layout.scss index cf2a1630e..14a37dd4a 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; } @@ -95,6 +98,10 @@ } } +#content { + flex: 1 0 auto; +} + /** * Flexbox layout system */ @@ -124,6 +131,9 @@ body.flexbox { .flex-container-row { display: flex; flex-direction: row; + &.v-center { + align-items: center; + } } .flex-container-column { @@ -131,36 +141,69 @@ body.flexbox { flex-direction: column; } +.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; + } } +.gap-m { + gap: $-m; +} + +.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; +} /** * 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 !important; } +.fill-height { + height: 100%; +} + .float { float: left; &.right { @@ -184,6 +227,13 @@ body.flexbox { } } +/** + * Border radiuses + */ +.rounded { + border-radius: 4px; +} + /** * Inline content columns */ @@ -231,6 +281,7 @@ body.flexbox { .tri-layout-middle { grid-area: b; padding-top: $-m; + min-width: 0; } } @include smaller-than($xxl) { @@ -251,13 +302,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 { @@ -319,13 +371,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; } }