<div class="button-15__bg"><a class="button-15" href="#"><span>ボタン15</span></a></div>
.button-15__bg
  a.button-15(href=link)
    span #{ text }
{
  "link": "#",
  "text": "ボタン15"
}
  • Content:
    $BLOCK_NAME: '.button-15';
    
    // 変数
    $color_primary: #018ebe;
    $color_bg: #f4f4f4;
    $gradient_gloss: linear-gradient(
      90deg,
      hsla(0, 0%, 100%, 0.13) 0,
      hsla(0, 0%, 100%, 0.13) 77%,
      hsla(0, 0%, 100%, 0.5) 92%,
      hsla(0, 0%, 100%, 0.3)
    );
    $shadow_default: inset 0 0 15px rgba(55, 82, 170, 0),
      inset 0 0 8px hsla(0, 0%, 100%, 0), inset 0 0 4px hsla(0, 0%, 100%, 0.2),
      5px 5px 9px rgba(126, 209, 235, 0.3), -9px -7px 13px #fff;
    $transition_default: 0.1s;
    $easing_default: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    #{ $BLOCK_NAME } {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 220px;
      height: 50px;
      overflow: hidden;
      color: $color_primary;
      letter-spacing: 0.01em;
      background: $color_bg;
      border-radius: 5px;
      box-shadow: $shadow_default;
      &::before,
      &::after {
        position: absolute;
        top: 0;
        bottom: 0;
        display: block;
        content: '';
      }
      &::before {
        right: 16px;
        width: 6px;
        height: 6px;
        margin: auto 0;
        color: $color_primary;
        border-top: 2px solid;
        border-right: 2px solid;
        transition: $transition_default $easing_default;
        transform: rotate(45deg);
      }
      &::after {
        left: 0;
        width: 200%;
        background: $gradient_gloss;
        opacity: 0;
        transform: translateX(-100%);
      }
      & > span {
        transition: $transition_default $easing_default;
      }
      &:hover {
        color: $color_primary;
        &::before {
          opacity: 0.55;
        }
        &::after {
          opacity: 1;
          transition-timing-function: ease;
          transition-duration: 0.7s, 0.15s;
          transition-property: transform, opacity;
          transform: translateX(0);
        }
        & > span {
          opacity: 0.55;
        }
      }
      // 背景
      &__bg {
        padding: 64px;
        background: $color_bg;
      }
    }
    
  • URL: /components/raw/button15/button15.scss
  • Filesystem Path: src/components/buttons/1_20/button15/button15.scss
  • Size: 1.9 KB