No notes defined.

<div class="box">
    <div class="box__content">
        <div class="box__title  title">
            <h2 class="h4">This is a box</h2>
        </div>
        <p>Lipsum has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
    </div>
    <footer class="box__footer">
        <a href="" class="button  align-center">Book Now</a>
    </footer>
</div>
{{ spaceless }}
{% set classString = '' %}
{% for modifier in modifiers %}
  {% set classString = classString ~ '  box--' ~ modifier %}
{% endfor %}
{% if background %}
  {% set classString = classString ~ '  box--bg-' ~ background %}
{% endif %}

<div class="box{{ classString }}">
  <div class="box__content">
    <div class="box__title  title">
      <h2 class="h4">{{ text }}</h2>
    </div>
    <p>{{ lorem }}</p>
  </div>
  <footer class="box__footer">
    <a href="" class="button  align-center">Book Now</a>
  </footer>
</div>
{{ endspaceless }}
  • Content:
    .box {
      position: relative;
      background: white;
      color: $text-color;
      margin: 0 0 $spacing-xl;
    
      &__figure {
        img {
          width: 100%;
        }
      }
    
      &__content {
        padding: calc(#{$spacing-sm} + 2.5%);
    
        > :first-child {
          margin-top: 0;
        }
    
        > :last-child {
          margin-bottom: 0;
        }
      }
    
      &__title {
        margin-top: 0;
    
        & * {
          color: $dark-blue;
        }
    
        a {
          text-decoration: none;
        }
    
      }
    
      &__footer {
        padding: $spacing-md calc(#{$spacing-sm} + 2.5%);
        background: $dark-blue;
        box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.05);
    
        > :first-child {
          margin-top: 0;
        }
    
        > :last-child {
          margin-bottom: 0;
        }
      }
    
    
      //--
    
      &--padded {
        padding: calc(#{$spacing-sm} + 2.5%);
      }
    
      //-
    
      &--has-shadow {
        box-shadow: 0 0.1em 0.25em rgba(0, 0, 0, 0.15);
      }
    
      //-
    
      &--bg-offwhite {
        background: $grey-50-pc;
    
        & .box__footer {
          background: $grey;
        }
      }
    
      &--bg-greyblue-superlight {
        background: $grey-50-pc;
      }
    
      &--bg-dark-blue, &--bg-slate {
        background: $dark-blue;
        color: #fff;
    
        & .box__title * {
            color: #fff;
          }
    
        & a.link--standard {
          color: #fff;
          text-decoration: none;
    
          &:hover {
            border-bottom: 0!important;
          }
        }
    
        & .box__footer {
          background: $grey;
        }
      }
    
      &--bg-offwhite-gradient {
        background: radial-gradient(45% 660% at 50% 50%, mix(#e3e3e3, white, 30%) 0%, mix(#ccc, white, 30%) 100%);
      }
    }
    
    // -- VARIANTS
    
    .box--with-abstitle {
      // absolutely positioned title
    
      .box__content:first-child {
        padding-top: calc(#{$spacing-3xl} + 2.5%);;
      }
    
      .box__abstitle {
        position: absolute;
        top: 0.2rem;
        left: 0;
      }
    
      .title__highlight {
        color: $neon;
        a {
          color: $neon;
        }
      }
    
      a {
        color: black;
        font-weight: 600;
        border-color: #ccc!important;
      }
    }
    
    // CG: Avoid "share this story" box clashing with long quotes in news stories
    .box--share {
      clear: right;
    }
  • URL: /components/raw/box/_boxes.scss
  • Filesystem Path: src\components\box\_boxes.scss
  • Size: 2.1 KB