X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/a6633642232efd164d4708967ab59e498fbff896..refs/pull/4103/head:/resources/sass/_layout.scss diff --git a/resources/sass/_layout.scss b/resources/sass/_layout.scss index c12cae256..19333faf7 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; } @@ -138,6 +144,10 @@ body.flexbox { 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; } @@ -145,22 +155,83 @@ body.flexbox { .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 @@ -178,6 +249,10 @@ body.flexbox { display: inline-block !important; } +.relative { + position: relative; +} + .hidden { display: none !important; } @@ -193,6 +268,11 @@ body.flexbox { } } +.sticky-top-m { + position: sticky; + top: $-m; +} + /** * Visibility */ @@ -209,6 +289,13 @@ body.flexbox { } } +/** + * Border radiuses + */ +.rounded { + border-radius: 4px; +} + /** * Inline content columns */ @@ -256,6 +343,7 @@ body.flexbox { .tri-layout-middle { grid-area: b; padding-top: $-m; + min-width: 0; } } @include smaller-than($xxl) { @@ -276,9 +364,9 @@ 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; @@ -345,16 +433,15 @@ body.flexbox { display: none; } .tri-layout-left-contents > *, .tri-layout-right-contents > * { - opacity: 0.6; + @include lightDark(opacity, 0.6, 0.75); 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; } } - } @include smaller-than($m) { @@ -362,4 +449,4 @@ body.flexbox { margin-inline-start: 0; margin-inline-end: 0; } -} +} \ No newline at end of file