<a class="button-30" href="#">ボタン30</a>
a.button-30(href=link) #{ text }
{
  "link": "#",
  "text": "ボタン30"
}
  • Content:
    $BLOCK_NAME: '.button-30';
    
    // 変数
    $color_primary: #002570;
    $color_hover: #000;
    $color_white: #fff;
    $color_bg_base: #c7d6e8;
    $color_bg_bottom: repeating-linear-gradient(
      -45deg,
      $color_white,
      $color_white 3px,
      $color_bg_base 3px,
      $color_bg_base 6px
    );
    $duration_default: 0.2s;
    $easing_default: ease-in;
    
    #{ $BLOCK_NAME } {
      position: relative;
      display: block;
      width: 240px;
      padding: 20px 0 16px;
      font-size: 16px;
      color: $color_white;
      text-align: center;
      background: $color_primary;
      border-radius: 9999px;
      transition: background-color $duration_default $easing_default;
    
      &::before {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 24px;
        display: block;
        width: 20px;
        height: 3px;
        margin: auto;
        content: '';
        background: $color_white;
        transition: left $duration_default $easing_default;
      }
    
      &::after {
        position: absolute;
        top: 5px;
        left: 5px;
        z-index: -1;
        width: 100%;
        height: 100%;
        content: '';
        background: $color_bg_bottom;
        border-radius: 9999px;
      }
    
      &:hover {
        color: $color_white;
        background: $color_hover;
        &::before {
          left: 16px;
        }
      }
    }
    
  • URL: /components/raw/button30/button30.scss
  • Filesystem Path: src/components/buttons/21_40/button30/button30.scss
  • Size: 1.2 KB