<a class="button-47" href="#"><span class="button-47__inner">ボタン47</span></a>
a.button-47(href=link)
  span.button-47__inner #{ text }
{
  "link": "#",
  "text": "ボタン47"
}
  • Content:
    $BLOCK_NAME: '.button-47';
    
    // 変数
    $grad: linear-gradient(135deg, #6fa24a, #15a1cc);
    
    #{ $BLOCK_NAME } {
      position: relative;
      display: block;
      width: 320px;
      height: 64px;
      padding: 2px;
      border-radius: 9999px;
      background: $grad;
      z-index: 1;
    
      &::before {
        position: absolute;
        inset: 0;
        display: block;
        content: '';
        filter: blur(8px);
        background: $grad;
        border-radius: 9999px;
        z-index: -1;
        opacity: 0;
      }
    
      &__inner {
        display: flex;
        width: 100%;
        height: 100%;
        align-items: center;
        justify-content: center;
        background: #fff;
        border-radius: 9999px;
      }
    
      @media (any-hover: hover) {
        &::before {
          transition: opacity 0.3s;
          will-change: filter;
        }
        &:hover::before {
          opacity: 1;
        }
      }
    }
    
  • URL: /components/raw/button47/button47.scss
  • Filesystem Path: src/components/buttons/button47/button47.scss
  • Size: 795 Bytes