<a class="button-27" href="#"><span>ボタン27</span></a>
a.button-27(href=link)
span #{ text }
{
"link": "#",
"text": "ボタン27"
}
$BLOCK_NAME: '.button-27';
// 変数
$color_primary: #d7092f;
$color_white: #fff;
$gradient_bg: linear-gradient(0deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
$duration_default: 0.3s;
$easing_default: cubic-bezier(0.5, -2, 0.5, 2);
#{ $BLOCK_NAME } {
position: relative;
display: inline-block;
min-width: 350px;
padding: 11px 40px;
overflow: hidden;
background: $color_primary;
border-radius: 9999px;
&::before,
&::after {
position: absolute;
top: 0;
bottom: 0;
display: block;
margin: auto;
content: '';
}
&::before {
right: 0;
left: 0;
background: $gradient_bg;
opacity: 0;
transition: opacity $duration_default cubic-bezier(0.5, 0, 0, 1);
}
&::after {
right: 20px;
width: 10px;
height: 10px;
background: $color_white;
border-radius: 50%;
transition: transform $duration_default $easing_default;
}
& > span {
position: relative;
z-index: 1;
display: block;
font-family: 'Noto Sans JP', sans-serif;
font-size: 18px;
font-weight: 900;
line-height: 38px;
color: $color_white;
text-align: center;
letter-spacing: 1.05px;
transition: all $duration_default $easing_default;
}
&:hover {
&::before {
opacity: 0.25;
}
&::after {
transform: scale(1.5);
}
& > span {
padding-left: 0.2em;
letter-spacing: 0.2em;
transform: scale(1.05);
}
}
}