X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/ec775aec02c0887d5cf2dc23c938a75b7eaf67d2..refs/pull/5313/head:/resources/sass/_content.scss diff --git a/resources/sass/_content.scss b/resources/sass/_content.scss index 10a2cd983..7d130bb0c 100644 --- a/resources/sass/_content.scss +++ b/resources/sass/_content.scss @@ -11,30 +11,29 @@ .align-left { text-align: left; } - img.align-left, table.align-left { + img.align-left, table.align-left, iframe.align-left, video.align-left { float: left !important; margin: $-xs $-m $-m 0; } .align-right { text-align: right !important; } - img.align-right, table.align-right { + img.align-right, table.align-right, iframe.align-right, video.align-right { float: right !important; margin: $-xs 0 $-xs $-s; } .align-center { text-align: center; } - img.align-center { + img.align-center, video.align-center, iframe.align-center { display: block; } - img.align-center, table.align-center { + img.align-center, table.align-center, iframe.align-center, video.align-center { margin-left: auto; margin-right: auto; } - img { - max-width: 100%; - height:auto; + .align-justify { + text-align: justify; } h1, h2, h3, h4, h5, h6, pre { clear: left; @@ -110,18 +109,39 @@ margin-bottom: 1.375em; } - video { + video, iframe { max-width: 100%; } + + a { + text-decoration: underline; + } +} + +// This is seperated out so we can target it out-of-editor by default +// and use advanced (:not) syntax, not supported by things like PDF gen, +// to target in-editor scenarios to handle edge-case of TinyMCE using an +// image for data placeholders where we'd want height attributes to take effect. +body .page-content img, +.page-content img:not([data-mce-object]) { + max-width: 100%; + height:auto; } /** * Callouts + * Some styles duplicated for supporting logical units (eg. inline-end) while + * providing fallbacks to non-logical rules, so RTL is natively supported where possible. */ .callout { border-left: 3px solid #BBB; + border-inline-start: 3px solid #BBB; + border-inline-end: none; background-color: #EEE; - padding: $-s $-s $-s $-xl; + padding: $-s; + padding-left: $-xl; + padding-inline-start: $-xl; + padding-inline-end: $-s; display: block; position: relative; overflow: auto; @@ -132,6 +152,8 @@ width: 1.2em; height: 1.2em; left: $-xs + 2px; + inset-inline-start: $-xs + 2px; + inset-inline-end: unset; top: 50%; margin-top: -9px; display: inline-block; @@ -140,30 +162,30 @@ opacity: 0.8; } &.success { - @include lightDark(border-left-color, $positive, $positive-dark); - @include lightDark(background-color, lighten($positive, 68%), darken($positive-dark, 36%)); - @include lightDark(color, darken($positive, 16%), $positive-dark); + @include lightDark(border-color, $positive, $positive-dark); + @include lightDark(background-color, #eafdeb, #122913); + @include lightDark(color, #063409, $positive-dark); } &.success:before { background-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiMzNzZjMzkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+ICAgIDxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz4gICAgPHBhdGggZD0iTTEyIDJDNi40OCAyIDIgNi40OCAyIDEyczQuNDggMTAgMTAgMTAgMTAtNC40OCAxMC0xMFMxNy41MiAyIDEyIDJ6bS0yIDE1bC01LTUgMS40MS0xLjQxTDEwIDE0LjE3bDcuNTktNy41OUwxOSA4bC05IDl6Ii8+PC9zdmc+"); } &.danger { - @include lightDark(border-left-color, $negative, $negative-dark); - @include lightDark(background-color, lighten($negative, 56%), darken($negative-dark, 55%)); - @include lightDark(color, darken($negative, 20%), $negative-dark); + @include lightDark(border-color, $negative, $negative-dark); + @include lightDark(background-color, #fcdbdb, #250505); + @include lightDark(color, #4d0706, $negative-dark); } &.danger:before { background-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiNiOTE4MTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+ICAgIDxwYXRoIGQ9Ik0xNS43MyAzSDguMjdMMyA4LjI3djcuNDZMOC4yNyAyMWg3LjQ2TDIxIDE1LjczVjguMjdMMTUuNzMgM3pNMTIgMTcuM2MtLjcyIDAtMS4zLS41OC0xLjMtMS4zIDAtLjcyLjU4LTEuMyAxLjMtMS4zLjcyIDAgMS4zLjU4IDEuMyAxLjMgMCAuNzItLjU4IDEuMy0xLjMgMS4zem0xLTQuM2gtMlY3aDJ2NnoiLz4gICAgPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg=="); } &.info { - @include lightDark(border-left-color, $info, $info-dark); - @include lightDark(color, darken($info, 20%), $info-dark); - @include lightDark(background-color, lighten($info, 50%), darken($info-dark, 34%)); + @include lightDark(border-color, $info, $info-dark); + @include lightDark(background-color, #d3efff, #001825); + @include lightDark(color, #01466c, $info-dark); } &.warning { - @include lightDark(border-left-color, $warning, $warning-dark); - @include lightDark(background-color, lighten($warning, 50%), darken($warning-dark, 50%)); - @include lightDark(color, darken($warning, 20%), $warning-dark); + @include lightDark(border-color, $warning, $warning-dark); + @include lightDark(background-color, #fee3d3, #30170a); + @include lightDark(color, #6a2802, $warning-dark); } &.warning:before { background-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiNiNjUzMWMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+ICAgIDxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz4gICAgPHBhdGggZD0iTTEgMjFoMjJMMTIgMiAxIDIxem0xMi0zaC0ydi0yaDJ2MnptMC00aC0ydi00aDJ2NHoiLz48L3N2Zz4=");