shopperman
Version:
shopping cart ui for shopify stores
299 lines (296 loc) • 8.53 kB
CSS
.shopperman .reset-and-normalize, .shopperman .cart-area, .shopperman .product-area, .shopperman .reset-and-normalize *, .shopperman .cart-area *, .shopperman .product-area * {
box-sizing: border-box;
margin: 0;
padding: 0;
}
.shopperman .reset-and-normalize ol, .shopperman .cart-area ol, .shopperman .product-area ol, .shopperman .reset-and-normalize ul, .shopperman .cart-area ul, .shopperman .product-area ul {
list-style: none;
}
.shopperman .reset-and-normalize button, .shopperman .cart-area button, .shopperman .product-area button {
font-size: 1em;
border: none;
}
.shopperman .product-area .product-display .add-to-cart-button {
cursor: default;
}
.shopperman .product-area .product-display[data-in-cart=false] .add-to-cart-button {
cursor: pointer;
}
.shopperman .cart-area {
position: relative;
}
.shopperman .cart-system {
position: absolute;
top: 0;
left: 0;
width: 100%;
}
.shopperman .cart-button {
z-index: 1;
position: absolute;
display: inline-block;
top: 2em;
left: 100%;
width: 3em;
height: 3rem;
background: rgba(255, 255, 255, 0.2);
border-radius: 0 2px 2px 0;
user-select: none;
cursor: pointer;
}
.shopperman .cart-button::before {
content: "";
z-index: -1;
display: block;
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
background-repeat: no-repeat;
background-size: 60%;
background-position: center center;
}
.shopperman .cart-button span {
background: rgba(255, 255, 255, 0.5);
}
.shopperman .cart-button span.cart-numeral {
font-size: 0.8rem;
position: absolute;
margin-left: -0.5rem;
display: flex;
justify-content: center;
align-items: center;
width: 1rem;
height: 1rem;
border-radius: 1rem;
bottom: 55%;
right: 10%;
}
.shopperman .cart-button span.cart-close {
font-size: 1.2rem;
position: absolute;
margin-left: -0.75rem;
display: flex;
justify-content: center;
align-items: center;
width: 1.5rem;
height: 1.5rem;
border-radius: 1.5rem;
top: 50%;
left: 50%;
margin-top: -0.75rem;
margin-left: -0.75rem;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-x'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
background-repeat: no-repeat;
background-size: 80%;
background-position: center center;
}
.shopperman .cart-panel {
display: none;
position: absolute;
top: 2em;
right: 0;
width: 96%;
max-width: 40em;
min-height: 6em;
background: rgba(255, 255, 255, 0.2);
border-radius: 2px 0 2px 2px;
}
.shopperman .cart-panel h1 {
text-align: left;
font-size: 1.2em;
height: 3rem;
padding: 1rem;
}
.shopperman .cart-panel .cart-panel-content {
padding: 1rem;
padding-top: 0;
}
.shopperman .cart-panel .cart-panel-content > * + * {
margin-top: 1rem;
}
.shopperman .cart-system[data-panel-open=true] .cart-panel {
display: flex;
flex-direction: column;
}
.shopperman .cart-grid {
text-align: right;
}
.shopperman .cart-grid li {
display: flex;
justify-content: flex-end;
align-items: stretch;
margin-top: 0.2em;
}
.shopperman .cart-grid li > * {
flex: 0 1 auto;
padding: 0.5em;
text-align: center;
display: flex;
align-items: center;
}
.shopperman .pricevalue {
text-align: right;
justify-content: flex-end;
}
.shopperman .cart-manipulator .cart-item-list .cart-item-display .item-remove-button {
position: relative;
z-index: 1;
padding: 0.5em 2em;
cursor: pointer;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-x'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
background-repeat: no-repeat;
background-size: 40%;
background-position: center center;
}
.shopperman .cart-manipulator .cart-item-list .cart-item-display .item-quantity {
display: inline-block;
width: 4em;
border: none;
font-size: 1em;
}
.shopperman .cart-manipulator .cart-item-list .cart-item-display .item-title {
flex: 2;
text-align: left;
}
.shopperman .cart-manipulator .cart-item-list .cart-item-display .item-price {
flex: 1;
text-align: right;
}
.shopperman .cart-calculated-results {
width: 60%;
margin-left: auto;
padding-top: 0;
}
.shopperman .cart-calculated-results .cart-subtotal span {
flex: 2;
justify-content: flex-end;
}
.shopperman .cart-calculated-results .cart-subtotal .pricevalue {
flex: 1;
}
.shopperman .cart-checkout {
text-align: right;
}
.shopperman .cart-checkout .checkout-button {
display: inline-block;
font-weight: bold;
padding: 1em 2em;
border-radius: 2px;
cursor: pointer;
}
@media (max-width: 800px) {
.shopperman .cart-button {
left: auto;
right: 0;
border-radius: 2px 0 0 2px;
}
}
.shopperman.shopperman-theme-basic .cart-system {
color: #444;
}
.shopperman.shopperman-theme-basic .cart-system h1 {
text-transform: uppercase;
opacity: 0.8;
}
.shopperman.shopperman-theme-basic .cart-system h1 > span:nth-of-type(2) {
font-weight: normal;
}
.shopperman.shopperman-theme-basic .cart-button {
background-color: rgba(255, 255, 255, 0.9);
}
.shopperman.shopperman-theme-basic .cart-button::before {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-shopping-cart'%3E%3Ccircle cx='9' cy='21' r='1'%3E%3C/circle%3E%3Ccircle cx='20' cy='21' r='1'%3E%3C/circle%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'%3E%3C/path%3E%3C/svg%3E");
}
.shopperman.shopperman-theme-basic .cart-button span {
color: white;
}
.shopperman.shopperman-theme-basic .cart-button span.cart-numeral {
background: rgba(255, 0, 0, 0.8);
text-shadow: 1px 1px rgba(0, 0, 0, 0.2);
}
.shopperman.shopperman-theme-basic .cart-button span.cart-close {
background-color: rgba(0, 0, 0, 0.3);
}
.shopperman.shopperman-theme-basic .cart-system[data-items-in-cart="0"] .cart-button span.cart-numeral {
display: none;
}
.shopperman.shopperman-theme-basic .cart-system[data-panel-open=true] .cart-button::before {
background-image: none;
}
.shopperman.shopperman-theme-basic .cart-panel {
background: rgba(255, 255, 255, 0.96);
background: linear-gradient(to bottom right, white, rgba(220, 220, 220, 0.9));
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.shopperman.shopperman-theme-basic .cart-item-list li *, .shopperman.shopperman-theme-basic .cart-calculated-results li * {
background: rgba(255, 255, 255, 0.9);
}
.shopperman.shopperman-theme-basic .cart-item-list li *.pricevalue, .shopperman.shopperman-theme-basic .cart-calculated-results li *.pricevalue {
background: rgba(255, 255, 255, 0.6);
}
.shopperman.shopperman-theme-basic .cart-checkout .checkout-button {
color: #fff;
background: #1e9b2a;
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.25);
}
.shopperman.shopperman-theme-basic .cart-checkout .checkout-button[disabled] {
opacity: 0.6;
background: rgba(0, 0, 0, 0.1);
}
.shopperman-demo {
font-size: 16px;
font-family: sans-serif;
text-align: center;
background: #186d63;
color: #bbfff7;
}
.shopperman-demo a {
color: skyblue;
}
.shopperman-demo, .shopperman-demo * {
box-sizing: border-box;
margin: 0;
padding: 0;
}
.shopperman-demo body {
padding: 0 4em;
}
@media (max-width: 800px) {
.shopperman-demo body {
padding: 0;
}
}
.shopperman-demo *:focus {
outline: 4px solid cyan;
}
.shopperman-demo .slice {
width: 100%;
max-width: 1200px;
margin: 0 auto;
background: rgba(0, 0, 0, 0.1);
}
.shopperman-demo .slice p {
margin: 0.66em auto;
}
.shopperman-demo .content {
padding: 1em;
}
.shopperman-demo .product-display {
margin-top: 3em;
}
.shopperman-demo .product-display .add-to-cart-button {
display: inline-block;
width: 8em;
padding: 0.32em 1em;
background: #13af4b;
color: white;
border: none;
cursor: pointer;
}
.shopperman-demo .product-display .add-to-cart-button[disabled] {
background: rgba(255, 255, 255, 0.1);
cursor: default;
}
/*# sourceMappingURL=shopperman.css.map */