Skip to content
Snippets Groups Projects
hy-video.scss 5.11 KiB
Newer Older
  • Learn to ignore specific revisions
  • Tuukka Turu's avatar
    Tuukka Turu committed
    :host {
      display: block;
    }
    
    .hy-video__video-container {
      display: inline-block;
      margin-bottom: 8px;
      position: relative;
      width: 100%;
    
      @include breakpoint($wide) {
        margin-bottom: 16px;
      }
    
      iframe {
        height: 100%;
        overflow: hidden;
        width: 100%;
      }
    
      .hy-video__preview-image {
        height: 100%;
        left: 0;
        object-fit: cover;
        position: absolute;
        top: 0;
        width: 100%;
      }
    
      .hy-video__play {
        left: 50%;
        position: absolute;
        top: 50%;
        transform: translateX(-50%) translateY(-50%);
    
        button {
          align-items: center;
          background: transparent;
          border: none;
          display: flex;
          flex-direction: column;
    
          &:hover {
            cursor: pointer;
          }
        }
    
        button .hy-video__button-label {
          @include font-size(16px, 24px);
    
          color: var(--grayscale-white);
          font-family: var(--main-font-family);
          font-weight: bold;
          letter-spacing: -0.1px;
          text-align: center;
          text-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
          text-transform: uppercase;
    
          @include breakpoint($medium) {
            @include font-size(24px, 32px);
    
            letter-spacing: -0.14px;
            text-shadow: 0 0 16px rgba(0, 0, 0, 0.6);
          }
    
          @include breakpoint($extrawide) {
            @include font-size(28px, 32px);
    
            letter-spacing: -0.16px;
          }
    
          @include breakpoint($xlarge) {
    
    Tuukka Turu's avatar
    Tuukka Turu committed
            @include font-size(32px, 32px);
          }
        }
    
        button svg {
          fill: var(--grayscale-white);
          filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.6));
          height: 48px;
          width: 48px;
    
          @include breakpoint($medium) {
            filter: drop-shadow(0 0 16px rgba(0, 0, 0, 0.6));
            height: 60px;
            width: 60px;
          }
          @include breakpoint($wide) {
            height: 80px;
            width: 80px;
          }
          @include breakpoint($extrawide) {
            height: 104px;
            width: 104px;
          }
    
          @include breakpoint($xlarge) {
    
    Tuukka Turu's avatar
    Tuukka Turu committed
            height: 120px;
            width: 120px;
          }
        }
      }
    
      > *:not(.hy-video__label):not(.hy-video__play) {
        bottom: 0;
        left: 0;
        position: absolute;
        right: 0;
        top: 0;
      }
    
      &:after {
        content: '';
        display: block;
        // 16:9 ratio
        padding-top: (9 / 16) * 100%;
      }
    }
    
    .hy-video:not(.hy-video--horizontal) {
      display: flex;
      flex-direction: column;
    
      .hy-video__meta__description {
        @include breakpoint($wide) {
          width: 57.24%;
        }
      }
    }
    
    .hy-video__label {
      // font: h5 small size
      @include font-size(16px, 20px);
      background-color: var(--grayscale-black);
      bottom: 12px;
      color: var(--grayscale-white);
      font-family: var(--main-font-family);
      font-weight: bold;
      left: -8px;
      letter-spacing: -0.5px;
      max-width: 46%; // 5.5 columns
      padding: 6px 12px;
      position: absolute;
      text-transform: uppercase;
    
      @include breakpoint($narrow) {
        // >=480px
        // font: h4 small size
        @include font-size(18px, 24px);
        bottom: 20px;
        left: -16px;
        letter-spacing: -0.56px;
        max-width: 58%; // 7 columns
        padding: 12px 24px;
        position: absolute;
      }
    
      @include breakpoint($wide) {
        // Applies both to 960px-1200px and 1201-1440px
        // font: h4 medium size
        @include font-size(22px, 28px);
        bottom: 24px;
        left: -16px;
        letter-spacing: -0.69px;
        padding: 16px 24px;
        position: absolute;
      }
    
      @include breakpoint($xlarge) {
    
    Tuukka Turu's avatar
    Tuukka Turu committed
        // font: h3 medium size
        @include font-size(26px, 32px);
        bottom: 28px;
        left: -16px;
        letter-spacing: -0.8px;
        padding: 20px 24px;
        position: absolute;
      }
    }
    
    .hy-video.hy-video--horizontal {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    
      @include breakpoint($wide) {
        flex-direction: row;
      }
    
      .hy-video__meta {
        padding-left: 0;
        width: 100%;
    
        @include breakpoint($wide) {
          padding-left: 2.5%;
          width: 57.24%;
        }
      }
    }
    
    .hy-video__meta__title {
      h2.hy-heading {
        margin: 8px 0 12px 0 !important;
        padding: 0 !important;
    
        @include breakpoint($wide) {
          margin: 0 0 16px 0 !important;
        }
      }
    }
    
    .hy-video__meta__details {
      display: flex;
      flex-direction: row;
      margin-bottom: 12px;
    
      @include breakpoint($wide) {
        margin-bottom: 16px;
      }
    }
    
    .hy-video__meta__details--item {
      border-right: 1px dashed var(--brand-main-light);
      display: flex;
      flex-direction: column;
      margin-right: 44px;
      min-width: 87px;
      padding-right: 46px;
      place-content: center space-between;
    
      &:last-child {
        border-right: 0;
      }
    }
    
    .hy-video__meta__description {
      @include font-size(14px, 20px);
    
      color: var(--grayscale-dark);
      display: block;
      font-family: var(--main-font-family);
      letter-spacing: 0;
      width: 100%;
    
    
      @include breakpoint($narrow) {
    
    Tuukka Turu's avatar
    Tuukka Turu committed
        @include font-size(16px, 24px);
      }
    }
    
    .hy-video__meta__label {
    
      @include font-weight($bold);
    
    Tuukka Turu's avatar
    Tuukka Turu committed
    }
    
    .hy-video__meta__label,
    .hy-video__meta__content {
      @include font-size(16px, 20px);
    
      color: var(--grayscale-black);
      font-family: var(--main-font-family);
      letter-spacing: -0.5px;
    
    
      @include breakpoint($narrow) {
    
    Tuukka Turu's avatar
    Tuukka Turu committed
        @include font-size(18px, 24px);
    
        letter-spacing: -0.56px;
      }
    
      @include breakpoint($extrawide) {
        @include font-size(22px, 34px);
    
        letter-spacing: -0.69px;
      }
    }