|
| 1 | +lightbox { |
| 2 | + position: relative; |
| 3 | + display: block; |
| 4 | + width: 1100px; |
| 5 | + height: 800px; |
| 6 | + max-width: 94vw; |
| 7 | + max-height: 90vh; |
| 8 | + |
| 9 | + gallery { |
| 10 | + overflow: hidden; |
| 11 | + margin: 0; |
| 12 | + display: block; |
| 13 | + width: 100%; |
| 14 | + height: 100%; |
| 15 | + box-shadow: 0 11px 15px -7px rgba(0, 0, 0, 0.2), |
| 16 | + 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12); |
| 17 | + } |
| 18 | +} |
| 19 | + |
| 20 | +.g-backdrop { |
| 21 | + background-color: rgba(0, 0, 0, 0.9); |
| 22 | +} |
| 23 | + |
| 24 | +@mixin fullscreen() { |
| 25 | + width: 100%; |
| 26 | + lightbox { |
| 27 | + max-width: unset; |
| 28 | + max-height: unset; |
| 29 | + position: fixed; |
| 30 | + top: 0; |
| 31 | + left: 0; |
| 32 | + bottom: 0; |
| 33 | + right: 0; |
| 34 | + height: 100%; |
| 35 | + width: 100%; |
| 36 | + } |
| 37 | +} |
| 38 | + |
| 39 | +.fullscreen { |
| 40 | + @include fullscreen(); |
| 41 | +} |
| 42 | + |
| 43 | +.g-overlay { |
| 44 | + margin: auto; |
| 45 | + |
| 46 | + @media only screen and (max-width: 480px) { |
| 47 | + @include fullscreen(); |
| 48 | + } |
| 49 | +} |
| 50 | + |
| 51 | +// OVERLAY STYLE FROM 'https://github.com/angular/material2/blob/master/src/cdk/overlay/_overlay.scss' |
| 52 | + |
| 53 | +$cdk-z-index-overlay-container: 1000; |
| 54 | +$cdk-z-index-overlay: 1000; |
| 55 | +$cdk-z-index-overlay-backdrop: 1000; |
| 56 | + |
| 57 | +// Background color for all of the backdrops |
| 58 | +$cdk-overlay-dark-backdrop-background: rgba(0, 0, 0, 0.6); |
| 59 | + |
| 60 | +// Default backdrop animation is based on the Material Design swift-ease-out. |
| 61 | +$backdrop-animation-duration: 400ms !default; |
| 62 | +$backdrop-animation-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1) !default; |
| 63 | + |
| 64 | +.cdk-overlay-container, |
| 65 | +.cdk-global-overlay-wrapper { |
| 66 | + // Disable events from being captured on the overlay container. |
| 67 | + pointer-events: none; |
| 68 | + |
| 69 | + // The container should be the size of the viewport. |
| 70 | + top: 0; |
| 71 | + left: 0; |
| 72 | + height: 100%; |
| 73 | + width: 100%; |
| 74 | +} |
| 75 | + |
| 76 | +// The overlay-container is an invisible element which contains all individual overlays. |
| 77 | +.cdk-overlay-container { |
| 78 | + position: fixed; |
| 79 | + z-index: $cdk-z-index-overlay-container; |
| 80 | +} |
| 81 | + |
| 82 | +.cdk-global-overlay-wrapper { |
| 83 | + display: flex; |
| 84 | + position: absolute; |
| 85 | + z-index: $cdk-z-index-overlay; |
| 86 | +} |
| 87 | + |
| 88 | +// A single overlay pane. |
| 89 | +.cdk-overlay-pane { |
| 90 | + position: absolute; |
| 91 | + pointer-events: auto; |
| 92 | + box-sizing: border-box; |
| 93 | + z-index: $cdk-z-index-overlay; |
| 94 | +} |
| 95 | + |
| 96 | +.cdk-overlay-backdrop { |
| 97 | + position: absolute; |
| 98 | + top: 0; |
| 99 | + bottom: 0; |
| 100 | + left: 0; |
| 101 | + right: 0; |
| 102 | + |
| 103 | + z-index: $cdk-z-index-overlay-backdrop; |
| 104 | + pointer-events: auto; |
| 105 | + -webkit-tap-highlight-color: transparent; |
| 106 | + transition: opacity $backdrop-animation-duration |
| 107 | + $backdrop-animation-timing-function; |
| 108 | + opacity: 0; |
| 109 | + |
| 110 | + &.cdk-overlay-backdrop-showing { |
| 111 | + opacity: 0.48; |
| 112 | + } |
| 113 | +} |
| 114 | + |
| 115 | +.cdk-overlay-dark-backdrop { |
| 116 | + background: $cdk-overlay-dark-backdrop-background; |
| 117 | +} |
| 118 | + |
| 119 | +.cdk-overlay-transparent-backdrop { |
| 120 | + background: none; |
| 121 | +} |
| 122 | + |
| 123 | +// Used when disabling global scrolling. |
| 124 | +.cdk-global-scrollblock { |
| 125 | + position: fixed; |
| 126 | + width: 100%; |
| 127 | + overflow-y: scroll; |
| 128 | +} |
| 129 | + |
| 130 | +.g-btn-close { |
| 131 | + position: absolute; |
| 132 | + right: 0.9em; |
| 133 | + top: 0.9em; |
| 134 | + z-index: 60; |
| 135 | + cursor: pointer; |
| 136 | + width: 20px; |
| 137 | + height: 20px; |
| 138 | + @media only screen and (max-width: 480px) { |
| 139 | + right: 0.7em; |
| 140 | + top: 0.7em; |
| 141 | + } |
| 142 | +} |
| 143 | + |
0 commit comments