Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,178 +1,191 @@
$ig-screen-sm-min: 768px !default;
$ig-black: #222 !default;
$ig-blue: #337ab7 !default;
$ig-background-black: rgba(0, 0, 0, .4) !default;
/*rtl:begin:ignore*/

.image-gallery {
user-select: none;
}
@import "react-image-gallery/styles/scss/image-gallery.scss";

#screenshots .image-gallery {
$border-color: #c3c4c7;
$icon-color: #2c3338;
$button-background: #fff;
$descrip-background: #f6f7f7;
$descrip-color: #3c434a;
$fullscreen-background: $descrip-background;

width: 100%;
height: auto;

.image-gallery-content {
position: relative;
.image-gallery-content {
display: unset;
}

.image-gallery-swipe {
display: flex;
align-items: center;
flex-direction: column;
}

.image-gallery-left-nav,
.image-gallery-right-nav {
display: none;
font-size: ms( 10 );
height: 100%;
position: absolute;
top: 0;
z-index: 4;
border-color: #eee;
-webkit-transition: background 0.1s ease, border 0.1s ease;
transition: background 0.1s ease, border 0.1s ease;

@media (max-width: $ig-screen-sm-min) {
font-size: 3.4em;
}

@media (min-width: $ig-screen-sm-min) {
&:hover {
background: #fff;
opacity: 0.8;
border: 1px solid #eee;
}
margin: 0 1px;
padding: 0;
width: 2rem;
font-size: 2rem;
transition: none;
filter: none;
background: $button-background;

svg {
display: none;
}

&:before {
&::before {
content: "";
position: relative;
font-family: 'dashicons';
/* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
font-family: dashicons;
text-shadow: none;
font-weight: 700;
color: $icon-color;
}
}

.image-gallery-left-nav {
left: 0;
&:hover,
&:focus {
background: #2271b1;

&:before {
content: '\f341';
&::before {
color: #fff;
}
}
}

.image-gallery-left-nav {
border-radius: 0 4px 4px 0;

&:hover {
margin-left: -1px;
&::before {
content: "\f341";
}
}

.image-gallery-right-nav {
right: 0;
border-radius: 4px 0 0 4px;

&:before {
content: '\f345';
&::before {
content: "\f345";
}
}

&:hover {
margin-right: -1px;
.image-gallery-fullscreen-button {
padding: 12px;
line-height: 1;
color: $icon-color;
background: transparent;
border-radius: 4px;
filter: none;

&:hover,
&:focus {
background: #fff;
}
}

&:hover {
.image-gallery-left-nav,
.image-gallery-right-nav {
display: block;
.image-gallery-svg {
width: 24px;
height: 24px;
}
}
}

.image-gallery-slides {
line-height: 0;
overflow: hidden;
position: relative;
white-space: nowrap;
border: 1px solid #eee;
}
.image-gallery-slides {
width: 100%;
border: 1px solid $border-color;
}

.image-gallery-slide {
left: 0;
position: absolute;
top: 0;
width: 100%;
.image-gallery-slide {
img {
width: auto;
height: 340px;
object-fit: contain;
overflow: hidden;
object-position: center center;
}

&.center {
position: relative;
&.center img {
margin-left: auto;
margin-right: auto;
}

.image-gallery-description {
position: absolute;
bottom: 0;
display: inline-block;
padding: 10px 20px;
width: 100%;
background: $descrip-background;
color: $descrip-color;
line-height: 1.5;
white-space: normal;
font-size: ms(-2);
}
}

.image-gallery-image {
margin: 0;
display: flex;
flex-direction: column;
}

img {
display: block;
margin: 0 auto;
&.fullscreen-modal {
display: flex;
align-items: center;
z-index: 300; // Above the `250` of `.global-header`.
background: $fullscreen-background;
}

.image-gallery-description {
background: #f5f5f5;
color: $color__text-main;
line-height: 1.5;
padding: 10px 20px;
white-space: normal;
font-size: ms( -2 );
.fullscreen {
top: auto;
transform: none;
background: $fullscreen-background;

@media (max-width: $ig-screen-sm-min) {
font-size: ms( -2 );
padding: 8px 15px;
.image-gallery-left-nav,
.image-gallery-right-nav {
width: 4rem;
font-size: 4rem;
max-height: 100%;
}

}
}

.image-gallery-thumbnails {
background: #fff;
margin-top: 5px;
//overflow: hidden;

.image-gallery-thumbnails-container {
cursor: pointer;
text-align: center;
white-space: nowrap;
}

}

.image-gallery-thumbnail {
display: table-cell;
margin-right: 5px;
border: 1px solid #eee;
max-height: 100px;
overflow: hidden;
.image-gallery-slides {
width: 100%;
border: none;
}

.image-gallery-image {
margin: 0;
}
.image-gallery-slides,
.image-gallery-slide {
max-height: 100vh;
}

img {
vertical-align: middle;
width: 100px;
.image-gallery-slide img {
height: auto;
max-height: 90vh;
}

@media (max-width: $ig-screen-sm-min) {
width: 75px;
.image-gallery-description {
position: relative;
max-width: 800px;
margin-bottom: 0;
}
}

&:hover {
box-shadow: 0 1px 8px rgba(0,0,0,0.3);
}
.image-gallery-thumbnails-wrapper {
display: none;
}

&.active {
border: 1px solid $ig-blue;
}
}
body.admin-bar & {
margin-top: var(--wp-admin--admin-bar--height);

.image-gallery-thumbnail-label {
color: $ig-black;
font-size: 1em;
.image-gallery-slides,
.image-gallery-slide {
max-height: calc(100vh - var(--wp-admin--admin-bar--height));
}

@media(max-width: $ig-screen-sm-min) {
font-size: 0.8em;
.image-gallery-slide img {
max-height: calc(90vh - var(--wp-admin--admin-bar--height));
}
}
}
}

.image-gallery-index {
background: $ig-background-black;
bottom: 0;
color: #fff;
line-height: 1;
padding: 10px 20px;
position: absolute;
right: 0;
z-index: 4;
}
/*rtl:end:ignore*/
Loading