From 1edcae6cacf882bd4adcae5c71da0f6dc5ee6459 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 4 Oct 2019 16:47:03 +0200 Subject: [PATCH] wait #3107 @1 --- js/libs/fluidbook/fluidbook.menu.js | 6 +- style/fluidbook.slideshow.less | 142 +++++++++++++--------------- 2 files changed, 68 insertions(+), 80 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.menu.js b/js/libs/fluidbook/fluidbook.menu.js index cb2bd9eb..02d2e503 100644 --- a/js/libs/fluidbook/fluidbook.menu.js +++ b/js/libs/fluidbook/fluidbook.menu.js @@ -844,15 +844,11 @@ FluidbookMenu.prototype = { // Process each slide and calculate optimal height for image and slide container m.find('.fb-slideshow-slide').each(function () { - // Set the height on this container so flexbox can vertically center // the contents when they don't take up the full height available $(this).css('height', slideMaxHeight); - var captionHeight = 0; - if (!optimizeHeight) { - captionHeight = $(this).find('.fb-slideshow-slide-caption').outerHeight() || 0; - } + var captionHeight = $(this).find('.fb-slideshow-slide-caption').outerHeight() || 0; // Allow image to take up whatever height is left after accounting for the caption // This is only the max-height so the image might not end up being this tall... diff --git a/style/fluidbook.slideshow.less b/style/fluidbook.slideshow.less index 6dcf90eb..98d94bf0 100644 --- a/style/fluidbook.slideshow.less +++ b/style/fluidbook.slideshow.less @@ -3,97 +3,89 @@ // Slideshow Module .fb-slideshow { - position: relative; - padding: 0 60px; - - &.fb-slideshow-fullscreen { - padding: 0; - .fb-slideshow-slide { - .msie &, .edge & { - display: flex !important; - } - } - } - - img { - max-width: 100%; - } - - &-slide { - position: relative; - display: flex !important; - - .msie &, .edge & { - display: block !important; - } - flex-direction: column; - justify-content: center; - text-align: center; - //visibility: hidden; // Hide until JS can resize the images to avoid flicker - - &-image { - margin: 0 auto; - } - - &-caption { - padding: 1em 0; - } - } - - &-thumbnails { - &.fb-slideshow-nothumbs { - display: none; - } - - padding: 20px 60px 40px; - - img { - height: 80px; - width: auto; - margin-right: 30px; - cursor: pointer; - } - - .slick-current { - // Using outline so it doesn't affect layout or image size - outline: 5px solid @menu-select-background; - outline-offset: -5px; - } - } + position: relative; + padding: 0 60px; + + &.fb-slideshow-fullscreen { + padding: 0; + + .fb-slideshow-slide { + } + } + + img { + max-width: 100%; + } + + &-slide { + position: relative; + display: block; + text-align: center; + //visibility: hidden; // Hide until JS can resize the images to avoid flicker + + &-image { + margin: 0 auto; + } + + &-caption { + padding: 1em 0; + } + } + + &-thumbnails { + &.fb-slideshow-nothumbs { + display: none; + } + + padding: 20px 60px 40px; + + img { + height: 80px; + width: auto; + margin-right: 30px; + cursor: pointer; + } + + .slick-current { + // Using outline so it doesn't affect layout or image size + outline: 5px solid @menu-select-background; + outline-offset: -5px; + } + } } //--- Slick slider overrides .slick-slider * { - outline: none; + outline: none; } .slick-disabled { - opacity: 0.25; // Applied to arrows when not clickable + opacity: 0.25; // Applied to arrows when not clickable } .slick-arrow { - display: inline-block; - content: ''; - width: 25px; - height: 25px; - border-style: solid; - border-color: #fff; - border-width: 0 3px 3px 0; - z-index: 2; - - &:before { - display: none; - } + display: inline-block; + content: ''; + width: 25px; + height: 25px; + border-style: solid; + border-color: #fff; + border-width: 0 3px 3px 0; + z-index: 2; + + &:before { + display: none; + } } .slick-next { - transform: rotate(-45deg); - right: 20px; + transform: rotate(-45deg); + right: 20px; } .slick-prev { - transform: rotate(135deg); - left: 20px; + transform: rotate(135deg); + left: 20px; } -- 2.39.5