UNPKG

pkg-components

Version:
138 lines (123 loc) 2.56 kB
/* Styles for the dish action counter */ .dish-action__counter { display: inline-flex; border: 1px solid #dcdcdc; border-radius: 4px; margin-right: 10px; /* Original: 10px, Updated: 15px */ line-height: 1.15; font-family: PFont-Regular; /* Assumes a custom font named PFont-Regular */ font-size: 16px; } /* Styles for the marmita counter */ .marmita-counter { display: flex; padding: 10px; align-items: center; position: relative; } .marmita-counter__value_label { font-size: 10px; animation-name: zoomOutUp; animation-fill-mode: forwards; animation-direction: alternate; position: absolute; top: 5px; left: 0; right: 0; margin: auto; justify-content: center; align-items: center; display: flex; } /* Keyframes animation for marmita counter */ @keyframes zoomOutUp { from { transform: translate3d(0, 100%, 0); visibility: visible; } to { transform: translate3d(0, 0, 0); } } /* Styles for buttons and icons */ .marmita-counter .btn-icon { margin-left: 0; margin-right: 0; } .btn-icon:disabled { opacity: 0.4; cursor: no-drop; } .btn-icon.btn-icon--transparent { background: transparent; color: #ea1d2c; } /* Styles for the counter value */ .marmita-counter__value { height: 30px; min-width: 35px; line-height: 34px; text-align: center; font-size: 1.125rem; font-weight: 500; margin: 3px 0; } .marmita-counter__value { position: relative; will-change: transform, opacity; transition: transform 0.25s ease-out, opacity 0.25s ease-out; } .marmita-counter__value.move-up { animation: move-up 250ms ease-out; animation-fill-mode: forwards; } .marmita-counter__value.start-animate-up { animation: move-up-start 250ms ease-out; animation-fill-mode: forwards; } @keyframes move-up-start { 0% { top: 0px; } 100% { top: -50px; opacity: 0; } } @keyframes move-up { 0% { top: 50px; opacity: 0; } 100% { opacity: 1; top: 0; } } .marmita-counter__value.move-down { animation: move-down 250ms ease-out; animation-fill-mode: forwards; } .marmita-counter__value.start-animate-down { animation: move-down-start 250ms ease-out; animation-fill-mode: forwards; } @keyframes move-down-start { 0% { top: 0px; } 100% { top: 50px; opacity: 0; } } @keyframes move-down { 0% { top: -50px; opacity: 1; } 100% { opacity: 1; top: 0; } }