<a class="button-13" href="#">BUTTON13<span class="button-13__arrow"></span></a>
a.button-13(href=link) #{ text }
  span.button-13__arrow
{
  "link": "#",
  "text": "BUTTON13"
}
  • Content:
    $BLOCK_NAME: '.button-13';
    
    // 変数
    $color_primary: #000;
    $color_secondary: #fdcf10;
    $transition_bg: 0.3s;
    $transition_border: 0.3s;
    $transition_arrow: 1.5s;
    $easing_default: cubic-bezier(0.45, 0.05, 0.3, 0.93);
    $delay_arrow: 1s;
    $arrowAnimOption: $transition_arrow $easing_default $delay_arrow infinite;
    
    #{ $BLOCK_NAME } {
      position: relative;
      display: inline-flex;
      align-items: center;
      height: 45px;
      padding: 0 78px 0 36px;
      font-family: 'Josefin Sans', sans-serif;
      font-size: 12px;
      font-weight: 600;
      border: 1px solid $color_primary;
      transition: border-color $transition_border $easing_default;
      &::before {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: -1;
        display: block;
        content: '';
        background: $color_secondary;
        transition: transform $transition_bg $easing_default;
        transform: scaleX(0);
        transform-origin: right;
      }
      &:hover {
        border-color: $color_secondary;
        &::before {
          transform: scaleX(1);
          transform-origin: left;
        }
      }
      &__arrow {
        position: absolute;
        top: 0;
        right: 16px;
        bottom: 0;
        display: block;
        width: 48px;
        margin: auto 0;
        &::before,
        &::after {
          position: absolute;
          top: 0;
          bottom: 0;
          display: block;
          margin: auto 0;
          content: '';
          background: $color_primary;
        }
        &::before {
          right: 0;
          width: 8px;
          height: 8px;
          border-radius: 50%;
          animation: button13ArrowDot $arrowAnimOption;
        }
        &::after {
          right: 4px;
          left: 0;
          height: 1px;
          animation: button13ArrowLine $arrowAnimOption;
        }
      }
    }
    
    @keyframes button13ArrowDot {
      0% {
        opacity: 1;
        transform: scale(0);
      }
      30% {
        opacity: 1;
        transform: scale(0);
      }
      60% {
        opacity: 1;
        transform: scale(1);
      }
      100% {
        opacity: 0;
        transform: scale(1);
      }
    }
    
    @keyframes button13ArrowLine {
      0% {
        transform: scaleX(0);
        transform-origin: left center;
      }
      30% {
        transform: scaleX(1);
        transform-origin: left center;
      }
      31% {
        transform: scaleX(1);
        transform-origin: right center;
      }
      60% {
        transform: scaleX(0);
        transform-origin: right center;
      }
      100% {
        transform: scaleX(0);
        transform-origin: right center;
      }
    }
    
  • URL: /components/raw/button13/button13.scss
  • Filesystem Path: src/components/buttons/1_20/button13/button13.scss
  • Size: 2.4 KB