There are no notes for this item.

<p>In the LDN theme, the default tile uses the <code>$primary</code> colour, as in the main theme.</p>
<p>These can be styled with a modifier, which will cascade to the <code>title__highlight</code></p>
<p>Like other LDN themed component variants, the modifiers are in a map in <code>main-ldn.scss</code>, consider this the source of truth, but at the time of typing, they're currently:</p>

<ul>
    <li><code>accent-blue-ldn</code></li>
    <li><code>accent-blue-deep-ldn</code></li>
    <li><code>accent-magenta-ldn</code></li>
    <li><code>accent-purple-deep-ldn</code></li>
    <li><code>accent-tef-gold</code></li>
</ul>

For example:

<pre>&lt;div class=&quot;tile  tile--accent-blue-deep-ldn&quot;&gt;&lt;/div&gt;</pre>

<p>As the map is overwritten, colours from the main site are not available unless explicitly added to the map in Sass.</p>

<div class="grid  grid--flush  grid-2-cols@mobile-wide  grid-3-cols@tablet-wide">
    <div>
        <a class="tile  tile--accent-blue-deep-ldn" href="">
            <figure class="tile__figure">
                <img src="https://placeimg.com/500/500/people" class="tile__img" alt="" />
            </figure>

            <div class="tile__content">
                <div class="title tile__title">
                    <h3 class="h4  title__highlight">tile--accent-blue-deep-ldn</h3>
                </div>
                <div class="tile__content-body">
                    <p>Reach your full potential with our postgraduate courses.</p>
                </div>
            </div>
        </a>
    </div>

    <div>
        <a class="tile  tile--accent-blue-ldn" href="">
            <figure class="tile__figure">
                <img src="https://placeimg.com/500/500/architecture" class="tile__img" alt="" />
            </figure>

            <div class="tile__content">
                <div class="title tile__title">
                    <h3 class="h4  title__highlight">tile--accent-blue-ldn</h3>
                </div>
                <div class="tile__content-body">
                    <p>Study with us, no matter where in the world you come from.</p>
                </div>
            </div>
        </a>
    </div>

    <div>
        <a class="tile  tile--accent-magenta-ldn" href="">
            <figure class="tile__figure">
                <img src="https://placeimg.com/500/500/nature" class="tile__img" alt="" />
            </figure>

            <div class="tile__content">
                <div class="title tile__title">
                    <h3 class="h4  title__highlight">tile--accent-magenta-ldn</h3>
                </div>
                <div class="tile__content-body">
                    <p>Study Esports, Computer Games Design, Cyber Security, and more, with us in London.</p>
                </div>
            </div>
        </a>
    </div>

    <div>
        <a class="tile  tile--accent-purple-deep-ldn" href="">
            <figure class="tile__figure">
                <img src="https://placeimg.com/500/500/tech" class="tile__img" alt="" />
            </figure>

            <div class="tile__content">
                <div class="title tile__title">
                    <h3 class="h4  title__highlight">tile--accent-purple-deep-ldn</h3>
                </div>
                <div class="tile__content-body">
                    <p>Apply for a full-time undergraduate degree at Staffordshire University and get guaranteed accommodation.</p>
                </div>
            </div>
        </a>
    </div>

    <div>
        <a class="tile  tile--accent-tef-gold" href="">
            <figure class="tile__figure">
                <img src="https://placeimg.com/500/500/tech" class="tile__img" alt="" />
            </figure>

            <div class="tile__content">
                <div class="title tile__title">
                    <h3 class="h4  title__highlight">tile--accent-tef-gold</h3>
                </div>
                <div class="tile__content-body">
                    <p>Apply for a full-time undergraduate degree at Staffordshire University and get guaranteed accommodation.</p>
                </div>
            </div>
        </a>
    </div>
</div>

<hr />

<p><code>tile-group</code> can still be applied for a grouped hover effect, as follows:</p>

<div class="grid  grid--flush  grid-2-cols@mobile-wide  grid-3-cols@tablet-wide  tile-group">
    <div>
        <a class="tile" href="">
            <figure class="tile__figure">
                <img src="https://placeimg.com/500/500/people" class="tile__img" alt="" />
            </figure>

            <div class="tile__content">
                <div class="title tile__title">
                    <h3 class="h4  title__highlight">tile (no modifier)</h3>
                </div>
                <div class="tile__content-body">
                    <p>Reach your full potential with our postgraduate courses.</p>
                </div>
            </div>
        </a>
    </div>

    <div>
        <a class="tile  tile--accent-blue-ldn" href="">
            <figure class="tile__figure">
                <img src="https://placeimg.com/500/500/architecture" class="tile__img" alt="" />
            </figure>

            <div class="tile__content">
                <div class="title tile__title">
                    <h3 class="h4  title__highlight">tile--accent-blue-ldn</h3>
                </div>
                <div class="tile__content-body">
                    <p>Study with us, no matter where in the world you come from.</p>
                </div>
            </div>
        </a>
    </div>

    <div>
        <a class="tile  tile--accent-magenta-ldn" href="">
            <figure class="tile__figure">
                <img src="https://placeimg.com/500/500/nature" class="tile__img" alt="" />
            </figure>

            <div class="tile__content">
                <div class="title tile__title">
                    <h3 class="h4  title__highlight">tile--accent-magenta-ldn</h3>
                </div>
                <div class="tile__content-body">
                    <p>Study Esports, Computer Games Design, Cyber Security, and more, with us in London.</p>
                </div>
            </div>
        </a>
    </div>

    <div>
        <a class="tile  tile--accent-purple-deep-ldn" href="">
            <figure class="tile__figure">
                <img src="https://placeimg.com/500/500/tech" class="tile__img" alt="" />
            </figure>

            <div class="tile__content">
                <div class="title tile__title">
                    <h3 class="h4  title__highlight">tile--accent-purple-deep-ldn</h3>
                </div>
                <div class="tile__content-body">
                    <p>Apply for a full-time undergraduate degree at Staffordshire University and get guaranteed accommodation.</p>
                </div>
            </div>
        </a>
    </div>

    <div>
        <a class="tile  tile--accent-tef-gold" href="">
            <figure class="tile__figure">
                <img src="https://placeimg.com/500/500/tech" class="tile__img" alt="" />
            </figure>

            <div class="tile__content">
                <div class="title tile__title">
                    <h3 class="h4  title__highlight">tile--accent-tef-gold</h3>
                </div>
                <div class="tile__content-body">
                    <p>Apply for a full-time undergraduate degree at Staffordshire University and get guaranteed accommodation.</p>
                </div>
            </div>
        </a>
    </div>
</div>
<p>In the LDN theme, the default tile uses the <code>$primary</code> colour, as in the main theme.</p>
<p>These can be styled with a modifier, which will cascade to the <code>title__highlight</code></p>
<p>Like other LDN themed component variants, the modifiers are in a map in <code>main-ldn.scss</code>, consider this the source of truth, but at the time of typing, they're currently:</p>

<ul>
  <li><code>accent-blue-ldn</code></li>
  <li><code>accent-blue-deep-ldn</code></li>
  <li><code>accent-magenta-ldn</code></li>
  <li><code>accent-purple-deep-ldn</code></li>
  <li><code>accent-tef-gold</code></li>
</ul>

For example:

<pre>{{ '<div class="tile  tile--accent-blue-deep-ldn"></div>' | escape }}</pre>

<p>As the map is overwritten, colours from the main site are not available unless explicitly added to the map in Sass.</p>

<div class="grid  grid--flush  grid-2-cols@mobile-wide  grid-3-cols@tablet-wide">
  <div>
    <a class="tile  tile--accent-blue-deep-ldn" href="">
      <figure class="tile__figure">
        <img src="https://placeimg.com/500/500/people" class="tile__img" alt=""/>
      </figure>

      <div class="tile__content">
        <div class="title tile__title">
          <h3 class="h4  title__highlight">tile--accent-blue-deep-ldn</h3>
        </div>
        <div class="tile__content-body">
          <p>Reach your full potential with our postgraduate courses.</p>
        </div>
      </div>
    </a>
  </div>

  <div>
    <a class="tile  tile--accent-blue-ldn" href="">
      <figure class="tile__figure">
        <img src="https://placeimg.com/500/500/architecture" class="tile__img" alt=""/>
      </figure>

      <div class="tile__content">
        <div class="title tile__title">
          <h3 class="h4  title__highlight">tile--accent-blue-ldn</h3>
        </div>
        <div class="tile__content-body">
          <p>Study with us, no matter where in the world you come from.</p>
        </div>
      </div>
    </a>
  </div>

  <div>
    <a class="tile  tile--accent-magenta-ldn" href="">
      <figure class="tile__figure">
        <img src="https://placeimg.com/500/500/nature" class="tile__img" alt=""/>
      </figure>

      <div class="tile__content">
        <div class="title tile__title">
          <h3 class="h4  title__highlight">tile--accent-magenta-ldn</h3>
        </div>
        <div class="tile__content-body">
          <p>Study Esports, Computer Games Design, Cyber Security, and more, with us in London.</p>
        </div>
      </div>
    </a>
  </div>

  <div>
    <a class="tile  tile--accent-purple-deep-ldn" href="">
      <figure class="tile__figure">
        <img src="https://placeimg.com/500/500/tech" class="tile__img" alt=""/>
      </figure>

      <div class="tile__content">
        <div class="title tile__title">
          <h3 class="h4  title__highlight">tile--accent-purple-deep-ldn</h3>
        </div>
        <div class="tile__content-body">
          <p>Apply for a full-time undergraduate degree at Staffordshire University and get guaranteed accommodation.</p>
        </div>
      </div>
    </a>
  </div>

  <div>
    <a class="tile  tile--accent-tef-gold" href="">
      <figure class="tile__figure">
        <img src="https://placeimg.com/500/500/tech" class="tile__img" alt=""/>
      </figure>

      <div class="tile__content">
        <div class="title tile__title">
          <h3 class="h4  title__highlight">tile--accent-tef-gold</h3>
        </div>
        <div class="tile__content-body">
          <p>Apply for a full-time undergraduate degree at Staffordshire University and get guaranteed accommodation.</p>
        </div>
      </div>
    </a>
  </div>
</div>

<hr/>

<p><code>tile-group</code> can still be applied for a grouped hover effect, as follows:</p>


<div class="grid  grid--flush  grid-2-cols@mobile-wide  grid-3-cols@tablet-wide  tile-group">
  <div>
    <a class="tile" href="">
      <figure class="tile__figure">
        <img src="https://placeimg.com/500/500/people" class="tile__img" alt=""/>
      </figure>

      <div class="tile__content">
        <div class="title tile__title">
          <h3 class="h4  title__highlight">tile (no modifier)</h3>
        </div>
        <div class="tile__content-body">
          <p>Reach your full potential with our postgraduate courses.</p>
        </div>
      </div>
    </a>
  </div>

  <div>
    <a class="tile  tile--accent-blue-ldn" href="">
      <figure class="tile__figure">
        <img src="https://placeimg.com/500/500/architecture" class="tile__img" alt=""/>
      </figure>

      <div class="tile__content">
        <div class="title tile__title">
          <h3 class="h4  title__highlight">tile--accent-blue-ldn</h3>
        </div>
        <div class="tile__content-body">
          <p>Study with us, no matter where in the world you come from.</p>
        </div>
      </div>
    </a>
  </div>

  <div>
    <a class="tile  tile--accent-magenta-ldn" href="">
      <figure class="tile__figure">
        <img src="https://placeimg.com/500/500/nature" class="tile__img" alt=""/>
      </figure>

      <div class="tile__content">
        <div class="title tile__title">
          <h3 class="h4  title__highlight">tile--accent-magenta-ldn</h3>
        </div>
        <div class="tile__content-body">
          <p>Study Esports, Computer Games Design, Cyber Security, and more, with us in London.</p>
        </div>
      </div>
    </a>
  </div>

  <div>
    <a class="tile  tile--accent-purple-deep-ldn" href="">
      <figure class="tile__figure">
        <img src="https://placeimg.com/500/500/tech" class="tile__img" alt=""/>
      </figure>

      <div class="tile__content">
        <div class="title tile__title">
          <h3 class="h4  title__highlight">tile--accent-purple-deep-ldn</h3>
        </div>
        <div class="tile__content-body">
          <p>Apply for a full-time undergraduate degree at Staffordshire University and get guaranteed accommodation.</p>
        </div>
      </div>
    </a>
  </div>

  <div>
    <a class="tile  tile--accent-tef-gold" href="">
      <figure class="tile__figure">
        <img src="https://placeimg.com/500/500/tech" class="tile__img" alt=""/>
      </figure>

      <div class="tile__content">
        <div class="title tile__title">
          <h3 class="h4  title__highlight">tile--accent-tef-gold</h3>
        </div>
        <div class="tile__content-body">
          <p>Apply for a full-time undergraduate degree at Staffordshire University and get guaranteed accommodation.</p>
        </div>
      </div>
    </a>
  </div>
</div>
  • Content:
    .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);
              }
            }
          }
        }
      }
    }
  • URL: /components/raw/tile/_tile-group.scss
  • Filesystem Path: src/components/tile/_tile-group.scss
  • Size: 376 Bytes
  • Content:
    .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');
        }
      }
    
      &__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);
      }
    
      @each $name, $value in $tile-accent-colors {
        &--accent-#{$name} {
          --accent-color: #{$value};
        }
      }
    
      &--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;
    }
  • URL: /components/raw/tile/_tile.scss
  • Filesystem Path: src/components/tile/_tile.scss
  • Size: 1.7 KB