It's been tricky but got there finally! Hello `:global` - Avoid using one global CSS file containing everything - Import the component SCSS file in a script tag from the component file to allow style scoping and including it only when used
48 lines
972 B
SCSS
48 lines
972 B
SCSS
.button-cart {
|
|
position: relative;
|
|
pointer-events: auto;
|
|
|
|
@include bp (sm) {
|
|
display: flex;
|
|
margin-left: auto;
|
|
}
|
|
|
|
:global(button) {
|
|
overflow: visible;
|
|
}
|
|
|
|
// Icon
|
|
:global(svg) {
|
|
display: block;
|
|
width: min(65%, 27px);
|
|
height: min(65%, 27px);
|
|
margin-top: -3px;
|
|
color: #fff;
|
|
}
|
|
|
|
// Quantity label
|
|
.quantity {
|
|
position: absolute;
|
|
z-index: 2;
|
|
top: 50%;
|
|
left: 2px;
|
|
transform: translate3d(-50%, -50%, 0);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 18px;
|
|
height: 18px;
|
|
font-size: rem(11px);
|
|
font-weight: 600;
|
|
color: #fff;
|
|
background-color: $color-secondary;
|
|
border-radius: 100%;
|
|
opacity: 1;
|
|
|
|
@include bp (md) {
|
|
width: 22px;
|
|
height: 22px;
|
|
font-size: rem(12px);
|
|
}
|
|
}
|
|
} |