No notes defined.
<div class="tile">
<figure class="tile__figure">
<img src="https://picsum.photos/500/500?random=1" class="tile__img" alt="" />
</figure>
<div class="tile__content">
<div class="title tile__title">
<h3 class="h4 title__highlight">A longer title to check line-wrapping</h3>
</div>
<div class="tile__content-body">
<p><strong>This is about the limit of copy.</strong> Longer might look fine at very wide widths, but it won't at smaller widths. Don't exceed this.</p>
</div>
</div>
</div>
<div class="tile">
<figure class="tile__figure">
<img src="https://picsum.photos/500/500?random=1" class="tile__img" alt=""/>
</figure>
<div class="tile__content">
<div class="title tile__title">
<h3 class="h4 title__highlight">A longer title to check line-wrapping</h3>
</div>
<div class="tile__content-body">
<p><strong>This is about the limit of copy.</strong> Longer might look fine at very wide widths, but it won't at smaller widths. Don't exceed this.</p>
</div>
</div>
</div>
.tile-group {
a.tile {
transition: transform 200ms;
&:hover {
transform: scale(1.025);
z-index: 2;
}
}
&:hover {
a.tile {
.tile__figure {
img {
filter: grayscale(1);
}
}
&:hover {
.tile__figure {
img {
filter: grayscale(0);
}
}
}
}
}
}
.tile {
// $tile-accent-colors: see __vars/colours
position: relative;
display: block;
overflow: hidden;
outline: 1px solid $grey--light;
box-shadow: 0 0.1em 0.25em rgba(0, 0, 0, 0.15);
min-height: 10em;
&__figure {
position: relative;
margin: 0;
z-index: 0;
img {
transition: filter 250ms;
}
@supports (object-fit: cover) {
img {
height: 100%;
max-height: 75vmin;
object-fit: cover;
object-position: center center;
}
}
}
&__content {
position: absolute;
bottom: 0;
left: 0;
margin-right: 2rem;
max-height: 90%;
padding: 0 $spacing-md 1px;
background: white;
box-sizing: border-box;
z-index: 1;
&-body {
@include typescale('sm');
@include line-height('normal');
& .button > .icon {
margin-right: $spacing-2xs;
}
}
}
&--facility {
margin-bottom: $spacing-xs;
& .tile__content {
position: static;
margin-right: 0;
}
}
&__caption {
position: absolute;
bottom: 0;
left: 0;
margin-right: 2rem;
max-height: 90%;
z-index: 1;
padding: 0;
border: 0;
background: none;
.title:only-child {
margin: 0;
}
}
&__title {
margin-top: -$spacing-md!important;
}
.title__highlight {
--background: var(--accent-color);
}
.tile {
.title__highlight {
a {
color: white;
color: var(--color);
}
}
}
@each $name, $value in $tile-accent-colors {
&--accent-#{$name} {
--accent-color: #{$value};
& .title .title__highlight {
@if (choose-contrast-color($value) == black) {
color: black;
}
}
}
}
&--no-shadow {
box-shadow: none;
}
}
a.tile {
//.tile__figure {
// img {
// filter: grayscale(100%);
// }
//}
&:hover,
&:focus {
color: $neutral--primary;
//.tile__figure {
// img {
// filter: grayscale(0);
// }
//}
}
&:focus {
outline-width: 3px;
outline-color: $primary;
z-index: 2;
}
}
.has-cta .tile {
min-height: 30em;
}
.read-more {
&__link {
font-weight: bold;
text-decoration: underline;
&:after {
content: '\25BC';
}
&.is-open:after {
content: '\25B2';
}
&:hover {
cursor: pointer;
}
}
&__text {
display: none;;
}
}