width: 100%
.bgimg
- width 100%
- height 100%
- display inline
- object-fit contain
- object-position 50% 50%
+ width: 100%
+ height: 100%
+ display: inline
+ object-fit: contain
+ object-position: 50% 50%
&.cover
- object-fit cover
-
+ object-fit: cover
.no-objectfit & {
- height auto
+ height: auto
}
constrain(margin-bottom, -5vw)
z-index: 10
+// Image overlay: radial gradient to provide better readability for overlapping text
+.image-overlay-radial
+ position: relative
+ overflow: hidden
+
+ &:after
+ content: ''
+ position: absolute
+ width: 100%
+ height: 100%
+ top: 0
+ background: radial-gradient(circle at 85% 30%, rgba(255,255,255,0.9) 0%, rgba(0,0,0,0) 60%)
+
+
// VueJS styling to hide elements until they're ready
[v-cloak]
visibility: hidden
&:before
content: ''
position: absolute
- left: 0
+ left: -5%
bottom: -5px // Avoid small gaps at some resolutions when bottom: 0
width: 110% // A bit wider to get rid of small gaps at some resolutions
- height: 50%
- background-image: linear-gradient(to top, rgba(#000, 0.6), transparent)
+ height: 100%
+ background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.75) 20%, rgba(0, 0, 0, 0.75) 30%, transparent)
&-text
@apply absolute text-2xl text-white font-display
- constrain(left, 2.5vw)
+ constrain(left, 1.75vw)
+ constrain(right, 1.75vw)
constrain(bottom, 2.5vw)
+below(900px)
{{-- Image sticks to sides on medium and small screens --}}
<column class="md:-ml-2v sm:-mr-2v sm:mb-0">
@if ($image)
- <img src="{{ $image }}" alt="{{ $alt }}">
+ <div class="image-overlay-radial">
+ <img src="{{ $image }}" alt="{{ $alt }}">
+ </div>
@endif
</column>