Files
housesof/src/style/atoms/_button-cart.scss
Félix Péault cdabe6935b 🔥 Huge style refactoring by using SvelteKit built-in style tag
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
2022-06-22 23:26:00 +02:00

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);
}
}
}