RECOMMEND
この商品を見た人はこちらもチェック
/* 1. ボタン本体の丸枠・サイズ固定・はみ出し隠しをリセット */
.color-swatch__item,
.material-nav__item {
width: auto !important;
height: auto !important;
border: none !important;
border-radius: 0 !important;
background: transparent !important;
overflow: visible !important;
padding: 0 !important;
display: inline-flex;
flex-direction: column;
align-items: center;
gap: 6px;
}
/* 2. アイコン部分(丸・四角)にサイズと枠を移す */
.color-swatch__chip {
display: block;
width: 32px; /* 元のサイズに合わせて調整 */
height: 32px; /* 元のサイズに合わせて調整 */
border-radius: 50%;
background-color: var(--swatch-color);
border: 1px solid #ccc;
}
.material-nav__image {
display: block;
width: 48px; /* 元のサイズに合わせて調整 */
height: 48px; /* 元のサイズに合わせて調整 */
border-radius: 50%; /* 四角なら 4px などに変更 */
object-fit: cover;
border: 1px solid #ccc;
}
/* 3. 選択中(.is-active)の枠線をアイコン側につける */
.color-swatch__item.is-active .color-swatch__chip,
.material-nav__item.is-active .material-nav__image {
outline: 2px solid #000;
outline-offset: 2px;
}
/* 4. 下のラベル文字 */
.color-swatch__item::after {
content: attr(data-color-name);
font-size: 11px;
line-height: 1.2;
text-align: center;
color: #333;
white-space: nowrap;
}
.material-nav__item::after {
content: attr(data-material-name);
font-size: 11px;
line-height: 1.2;
text-align: center;
color: #333;
white-space: nowrap;
}
/* 5. 横並びリスト(ul)の上揃え */
.color-swatch__list,
.material-nav__list {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
gap: 12px;
}