| 1 |
/* reset commonly used image styles that can screw up the gallery */ |
| 2 |
|
| 3 |
.rgg-imagegrid a, .rgg-imagegrid a:hover { |
| 4 |
box-shadow: none; |
| 5 |
} |
| 6 |
|
| 7 |
.rgg-imagegrid { position: relative; clear:both; } |
| 8 |
|
| 9 |
.rgg-imagegrid > .rgg-img { |
| 10 |
display:block; |
| 11 |
position: absolute; |
| 12 |
left:0; |
| 13 |
top:0; |
| 14 |
overflow: hidden; /* clip the inner <img> — e.g. when the zoom hover scales it past the tile */ |
| 15 |
background-color:#f4f4f4; /* placeholder behind the image while it loads */ |
| 16 |
/*border:4px solid #ffffff;*/ |
| 17 |
/*padding: 5px;*/ |
| 18 |
box-sizing: content-box; |
| 19 |
} |
| 20 |
|
| 21 |
/* Every tile is a real <img> filling the anchor box (replaces the old JS-painted CSS |
| 22 |
background-image and its 102%/cover background-size tricks). object-fit:cover crops to the |
| 23 |
tile, covering the fixed aspect-ratio (.rgg-crop) case too. transform-origin centres the |
| 24 |
zoom-hover scale (see Tile.zoom in main.js). */ |
| 25 |
.rgg-imagegrid > .rgg-img > .rgg-tile-img { |
| 26 |
position: absolute; |
| 27 |
top: 0; |
| 28 |
left: 0; |
| 29 |
width: 100%; |
| 30 |
height: 100%; |
| 31 |
object-fit: cover; |
| 32 |
transform-origin: center center; |
| 33 |
} |
| 34 |
|
| 35 |
/* Per-image duotone (Gutenberg): filter the <img> directly so it is recolored while the caption |
| 36 |
span (a sibling above it) stays un-recolored. */ |
| 37 |
.rgg-imagegrid > .rgg-img.rgg-duotone > .rgg-tile-img { |
| 38 |
filter: var(--rgg-duotone); |
| 39 |
} |
| 40 |
|
| 41 |
/* Native WP lightbox tiles carry no href, so the anchor keeps the default cursor; core only puts |
| 42 |
cursor:zoom-in on the tile <img>. An overlay caption (a span covering the whole tile) sits above |
| 43 |
the image and would otherwise inherit that default cursor, hiding the magnifier. Set zoom-in on |
| 44 |
the whole lightbox tile so it shows over the caption too (cursor is inherited). */ |
| 45 |
.rgg-imagegrid > .rgg-img.wp-lightbox-container { |
| 46 |
cursor: zoom-in; |
| 47 |
} |
| 48 |
|
| 49 |
/* SimpleLightbox sets the caption's inline width to the exact image width; without |
| 50 |
border-box its 10px padding would push it 20px wider than the image. */ |
| 51 |
.sl-wrapper .sl-image .sl-caption { |
| 52 |
box-sizing: border-box; |
| 53 |
} |
| 54 |
|
| 55 |
/* built-in captions styles and effects */ |
| 56 |
|
| 57 |
.rgg-caption-container { |
| 58 |
position: absolute; |
| 59 |
left:0; |
| 60 |
top:0; |
| 61 |
width: 100%; |
| 62 |
height:100%; |
| 63 |
overflow: hidden; |
| 64 |
/*background-color: rgba(255,0,0,.5);*/ |
| 65 |
} |
| 66 |
|
| 67 |
.rgg-caption-container .rgg-caption { |
| 68 |
box-sizing:border-box; |
| 69 |
position:absolute; |
| 70 |
left:0; |
| 71 |
bottom:0; |
| 72 |
/*transform: translate(0,100%);*/ |
| 73 |
background-color: rgba(0,0,0,0.8); |
| 74 |
font-size: 12px; |
| 75 |
width: 100%; |
| 76 |
text-align:center; |
| 77 |
color: #eeeeee; |
| 78 |
font-weight:bold; |
| 79 |
padding: 10px; |
| 80 |
} |
| 81 |
|
| 82 |
|
| 83 |
/* |
| 84 |
Example 1: adding borders to the images. |
| 85 |
------------------------------------------------------------------- |
| 86 |
Copy the CSS below to your theme's style.css file and uncomment it. |
| 87 |
Then modify as necessary. |
| 88 |
- Note: you cannot add padding or margins this way. To add margins between the images set the margin parameter |
| 89 |
in the schortcode or globally under Dashboard > RGG Options > Margin |
| 90 |
*/ |
| 91 |
/* |
| 92 |
.rgg-imagegrid > .rgg-img { |
| 93 |
border: 4px solid #3c3c9c; |
| 94 |
border-bottom-width: 20px; |
| 95 |
} |
| 96 |
*/ |
| 97 |
|
| 98 |
/* ------------------------------------------------------------------------------------------------------------------ */ |
| 99 |
|
| 100 |
/* |
| 101 |
Example 2: Custom Captions CSS. (RGG Pro Only) |
| 102 |
--------------------------------------------------------------------- |
| 103 |
Copy the CSS below to your theme's style.css file and uncomment it. |
| 104 |
Then go to Dashboard > RGG Options, and set Captions to Custom Style. |
| 105 |
*/ |
| 106 |
/* |
| 107 |
.rgg-imagegrid.captions-custom .rgg-caption-container { |
| 108 |
background-color: rgba(0,0,0,.6); |
| 109 |
} |
| 110 |
|
| 111 |
.rgg-imagegrid.captions-custom .rgg-caption-container:hover { |
| 112 |
background-color: rgba(0,0,0,0); |
| 113 |
} |
| 114 |
|
| 115 |
.rgg-imagegrid.captions-custom .rgg-caption-container .rgg-caption { |
| 116 |
bottom:50%; |
| 117 |
transform: translate(0,50%); |
| 118 |
background-color: transparent; |
| 119 |
font-size: 20px; |
| 120 |
text-align:center; |
| 121 |
font-weight:bold; |
| 122 |
transition: all .5s ease; |
| 123 |
} |
| 124 |
|
| 125 |
.rgg-imagegrid.captions-custom .rgg-caption-container:hover .rgg-caption { |
| 126 |
transform: translate(0,50%) scale(2,2); |
| 127 |
opacity: 0; |
| 128 |
} |
| 129 |
*/ |
| 130 |
|
| 131 |
.image-above-container .slide { |
| 132 |
background-color: #303030; |
| 133 |
text-align: center; |
| 134 |
} |
| 135 |
|
| 136 |
.image-above-container .slide img { |
| 137 |
margin: 0 auto; |
| 138 |
max-width:100%; |
| 139 |
height: auto; |
| 140 |
} |