exchangemarket/docs/css/main.scss
2022-05-14 14:38:18 +05:30

1326 lines
22 KiB
SCSS

* {
padding: 0;
margin: 0;
box-sizing: border-box;
font-family: "Roboto", sans-serif;
}
:root {
font-size: clamp(1rem, 1.2vmax, 1.2rem);
}
html,
body {
height: 100%;
scroll-behavior: smooth;
}
body {
--accent-color: #504dff;
--text-color: 20, 20, 20;
--foreground-color: 252, 253, 255;
--background-color: 241, 243, 248;
--danger-color: rgb(255, 75, 75);
--green: #1cad59;
scrollbar-width: thin;
scrollbar-gutter: stable;
color: rgba(var(--text-color), 1);
background-color: rgba(var(--background-color), 1);
transition: background-color 0.3s;
}
body[data-theme="dark"] {
--accent-color: #a3a1ff;
--text-color: 220, 220, 220;
--foreground-color: 27, 28, 29;
--background-color: 21, 22, 22;
--danger-color: rgb(255, 106, 106);
--green: #00e676;
sm-popup::part(popup) {
background-color: rgba(var(--foreground-color), 1);
}
}
p,
strong {
font-size: 0.9rem;
max-width: 70ch;
line-height: 1.7;
color: rgba(var(--text-color), 0.8);
&:not(:last-of-type) {
margin-bottom: 1.5rem;
}
}
a:where([class]) {
color: inherit;
text-decoration: none;
&:focus-visible {
box-shadow: 0 0 0 0.1rem rgba(var(--text-color), 1) inset;
}
}
a {
color: var(--accent-color);
}
button,
.button {
user-select: none;
position: relative;
display: inline-flex;
border: none;
background-color: transparent;
overflow: hidden;
color: inherit;
cursor: pointer;
transition: transform 0.3s;
-webkit-tap-highlight-color: transparent;
align-items: center;
font-size: 0.9rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.02em;
}
.button {
white-space: nowrap;
padding: 0.6rem 1rem;
border-radius: 0.3rem;
background-color: rgba(var(--text-color), 0.06);
color: rgba(var(--text-color), 0.8);
justify-content: center;
&--primary {
background-color: var(--accent-color);
color: rgba(var(--background-color), 1);
}
}
button:disabled {
opacity: 0.5;
}
a:any-link:focus-visible {
outline: rgba(var(--text-color), 1) 0.1rem solid;
}
sm-input {
font-size: 0.9rem;
--border-radius: 0.3rem;
}
sm-button {
text-transform: uppercase;
letter-spacing: 0.02em;
font-weight: 700;
font-size: 0.9rem;
--padding: 0.7rem 1rem;
&[variant="primary"] {
.icon {
fill: rgba(var(--background-color), 1);
}
}
&[disabled] {
.icon {
fill: rgba(var(--text-color), 0.6);
}
}
&.danger {
--background: var(--danger-color);
color: rgba(var(--background-color), 1);
}
}
sm-form {
--gap: 1rem;
}
sm-copy {
font-size: 0.9rem;
}
ul {
list-style: none;
}
.flex {
display: flex;
}
.flex-1 {
flex: 1;
}
.grid {
display: grid;
}
.hide {
opacity: 0;
pointer-events: none;
}
.hide {
display: none !important;
}
.overflow-ellipsis {
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.wrap-around {
overflow-wrap: break-word;
word-wrap: break-word;
-ms-word-break: break-all;
word-break: break-word;
-ms-hyphens: auto;
-moz-hyphens: auto;
-webkit-hyphens: auto;
hyphens: auto;
}
.full-bleed {
grid-column: 1/4;
}
.h1 {
font-size: 1.5rem;
}
.h2 {
font-size: 1.2rem;
}
.h3 {
font-size: 1rem;
}
.h4 {
font-size: 0.9rem;
}
.h5 {
font-size: 0.8rem;
}
.uppercase {
text-transform: uppercase;
}
.capitalize {
text-transform: capitalize;
}
.flex {
display: flex;
}
.grid {
display: grid;
}
.grid-3 {
grid-template-columns: 1fr auto auto;
}
.flow-column {
grid-auto-flow: column;
}
.gap-0-3 {
gap: 0.3rem;
}
.gap-0-5 {
gap: 0.5rem;
}
.gap-1 {
gap: 1rem;
}
.gap-1-5 {
gap: 1.5rem;
}
.gap-2 {
gap: 2rem;
}
.gap-3 {
gap: 3rem;
}
.text-align-right {
text-align: right;
}
.align-start {
align-items: flex-start;
}
.align-center {
align-items: center;
}
.text-center {
text-align: center;
}
.justify-start {
justify-content: start;
}
.justify-center {
justify-content: center;
}
.justify-right {
margin-left: auto;
}
.align-self-center {
align-self: center;
}
.justify-self-center {
justify-self: center;
}
.justify-self-start {
justify-self: start;
}
.justify-self-end {
justify-self: end;
}
.direction-column {
flex-direction: column;
}
.space-between {
justify-content: space-between;
}
.w-100 {
width: 100%;
}
.interact {
position: relative;
overflow: hidden;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.ripple {
height: 8rem;
width: 8rem;
position: absolute;
border-radius: 50%;
transform: scale(0);
background: radial-gradient(
circle,
rgba(var(--text-color), 0.3) 0%,
rgba(0, 0, 0, 0) 50%
);
pointer-events: none;
}
.icon {
width: 1.2rem;
height: 1.2rem;
fill: rgba(var(--text-color), 0.8);
}
.margin-right-0-5 {
margin-right: 0.5rem;
}
.margin-left-0-5 {
margin-left: 0.5rem;
}
.icon-only {
padding: 0.6rem;
aspect-ratio: 1/1;
background-color: transparent;
}
.icon-button {
padding: 0.6rem;
border-radius: 0.8rem;
background-color: var(--accent-color--light);
height: max-content;
.icon {
fill: var(--accent-color);
}
}
.empty-state {
display: grid;
text-align: center;
justify-items: center;
width: 100%;
max-width: none;
padding: 1.5rem;
&__icon {
height: 3rem;
width: 3rem;
padding: 0.6rem;
border-radius: 1rem;
background-color: rgba(var(--text-color), 0.06);
margin-bottom: 1rem;
}
}
.observe-empty-state:empty {
display: none !important;
}
.observe-empty-state:not(:empty) + .empty-state {
display: none !important;
}
#confirmation_popup,
#prompt_popup {
flex-direction: column;
h4 {
font-weight: 500;
margin-bottom: 0.5rem;
}
sm-button {
margin: 0;
}
.flex {
padding: 0;
margin-top: 1rem;
sm-button:first-of-type {
margin-right: 0.6rem;
margin-left: auto;
}
}
}
#prompt_message {
margin-bottom: 1.5rem;
}
.popup__header {
display: grid;
gap: 0.5rem;
width: 100%;
padding: 0 1.5rem;
align-items: center;
}
.popup__header__close {
padding: 0.5rem;
margin-left: -0.7rem;
cursor: pointer;
}
#main_page {
padding: 1.5rem;
& > section:nth-of-type(1) {
align-content: flex-start;
}
}
.logo {
display: grid;
align-items: center;
width: 100%;
grid-template-columns: auto 1fr;
gap: 0 0.3rem;
margin-right: 1rem;
h4 {
text-transform: capitalize;
font-size: 0.9rem;
font-weight: 600;
}
.main-logo {
height: 1.4rem;
width: 1.4rem;
fill: rgba(var(--text-color), 1);
stroke: none;
}
}
details {
&:not(:last-of-type) {
border-bottom: thin solid rgba(var(--text-color), 0.3);
}
summary {
display: flex;
justify-content: space-between;
user-select: none;
cursor: pointer;
padding: 1rem 0;
}
.icon {
flex-shrink: 0;
}
&[open] {
padding-bottom: 1rem;
summary {
.icon {
transform: rotate(180deg);
}
}
}
}
strip-select {
--gap: 0;
background-color: rgba(var(--text-color), 0.06);
border-radius: 0.2rem;
}
strip-option {
font-weight: 500;
font-size: 0.8rem;
--border-radius: 0;
--active-option-color: rgba(var(--background-color), 1);
--active-option-background-color: var(--accent-color);
&:first-of-type {
--border-radius: 0.2rem 0 0 0.2rem;
}
&:last-of-type {
--border-radius: 0 0.2rem 0.2rem 0;
}
}
sm-select,
sm-option {
font-size: 0.9rem;
}
sm-checkbox {
--height: 1rem;
--width: 1rem;
-webkit-tap-highlight-color: transparent;
}
.warning {
background-color: khaki;
color: rgba(0, 0, 0, 0.7);
padding: 1rem;
border-radius: 0.5rem;
line-height: 1.5;
}
.tip {
border-radius: 1.5rem;
background-color: rgba(var(--text-color), 0.06);
padding: 0.3rem 0.8rem;
font-size: 0.85rem;
.icon {
fill: var(--accent-color);
flex-shrink: 0;
}
}
.tooltip {
position: relative;
z-index: 1;
cursor: pointer;
.banner {
position: absolute;
right: 0;
width: min(20rem, calc(100vw - 1rem));
display: none;
font-size: 0.9rem;
background-color: rgba(var(--foreground-color), 1);
padding: 1rem;
border-radius: 0.5rem;
box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.1);
border: solid thin rgba(var(--text-color), 0.2);
}
&:hover .banner {
display: block;
}
}
.page-layout {
display: grid;
grid-template-columns: 1.5rem minmax(0, 1fr) 1.5rem;
& > * {
grid-column: 2/3;
}
}
.page {
height: 100%;
}
.mobile-page {
align-items: flex-start;
}
#landing {
grid-template-rows: auto 1fr;
header {
padding: 1.5rem 0;
}
& > .grid {
align-content: flex-start;
text-align: center;
gap: 1rem;
}
}
#sign_up {
grid-template-rows: auto 1fr;
align-items: center;
section {
margin-top: -6rem;
justify-self: center;
width: min(24rem, 100%);
}
header {
padding: 1.5rem 0;
}
.h2 {
margin-bottom: 0.5rem;
}
h5 {
font-weight: 500;
color: rgba(var(--text-color), 0.8);
}
.warning {
margin-top: 2rem;
}
}
.multi-state-button {
display: grid;
text-align: center;
align-items: center;
& > * {
grid-area: 1/1/2/2;
}
button {
z-index: 1;
}
}
#home {
height: 100%;
display: flex;
flex-direction: column;
align-items: flex-start;
align-content: flex-start;
}
#login_form {
width: min(24rem, 100%);
margin: 0 auto;
}
#login_form__priv_key {
margin-top: 1rem;
}
#main_header {
display: grid;
gap: 1rem;
padding: 1.5rem;
width: 100%;
align-items: center;
grid-template-columns: 1fr auto auto;
grid-column: 1/-1;
}
#main_navbar {
width: 100%;
}
.main_navbar__item {
display: flex;
flex-direction: column;
align-items: center;
flex: 1;
padding: 0.5rem 0;
.item__title,
.icon {
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
opacity 0.3s;
}
.item__title {
color: rgba(var(--text-color), 0.8);
font-size: 0.8rem;
font-weight: 500;
}
.icon {
height: 1.2rem;
margin-bottom: 0.3rem;
}
&--active {
.item__title {
color: var(--accent-color);
}
.icon {
fill: var(--accent-color);
}
}
}
#pages_container {
display: flex;
flex: 1;
width: 100%;
justify-content: center;
overflow-y: auto;
padding: 0 1.5rem;
& > * {
min-width: min(26rem, 100%);
}
}
.listed-asset {
position: relative;
gap: 0.5rem;
padding: 1rem 0;
border-radius: 0.5rem;
opacity: 0.8;
font-weight: 400;
transition: background-color 0.3s;
user-select: none;
color: inherit;
grid-template-columns: auto 1fr auto auto;
grid-template-areas: "icon name rate right-arrow" "icon name countdown right-arrow";
&__icon {
grid-area: icon;
padding: 0.5rem;
border-radius: 1rem;
display: flex;
background-color: var(--accent-color);
.icon {
height: 1.2rem;
width: 1.2rem;
fill: rgba(var(--background-color), 1);
}
}
&__name {
grid-area: name;
margin-left: 0.3rem;
}
&__rate {
grid-area: rate;
}
&__countdown {
grid-area: countdown;
justify-self: flex-end;
border-radius: 0.3rem;
padding: 0.2rem 0.4rem;
font-size: 0.8rem;
background-color: #f0e68cc0;
color: rgba(0, 0, 0, 0.9);
}
&__right-arrow {
grid-area: right-arrow;
}
}
.quantity-selector {
.button {
flex: 1;
padding: 0.5rem 0.6rem;
margin-left: 0.5rem;
}
}
#quantity_selector_tip {
&::first-letter {
text-transform: uppercase;
}
}
#quantity_type,
#wallet_quantity_type {
font-size: 0.8rem;
padding-right: 0.5rem;
border-right: thin solid rgba(var(--text-color), 0.3);
margin-right: auto;
color: rgba(var(--text-color), 0.8);
line-height: 1.5;
font-weight: 500;
min-width: 8ch;
}
#exchange_wrapper {
display: flex;
flex-direction: column;
height: 100%;
}
#asset_page {
display: flex;
flex-direction: column;
height: 100%;
}
#asset_page__nav {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem 0;
.icon-only {
margin-left: -0.7rem;
}
}
#trade_form {
height: 100%;
&::part(form) {
display: flex;
flex-direction: column;
gap: 0;
}
& > * {
margin-bottom: 1rem;
}
& > :last-child {
margin-top: auto;
}
}
#my_orders,
#market {
width: min(42rem, 100%);
}
#my_orders {
grid-template-rows: auto 1fr;
}
.orders_section__header {
min-height: 2.8rem;
}
.list__item {
padding: 0.5rem 0;
display: grid;
}
.order-card {
position: relative;
outline: none;
user-select: none;
align-items: center;
gap: 0.5rem;
grid-template-columns: min-content repeat(3, 1fr) min-content;
border-radius: 0.5rem;
&__type {
font-size: 0.9rem;
font-weight: 500;
margin-bottom: 0.3rem;
}
&[data-type="buy"] &__type {
color: var(--green);
}
&[data-type="sell"] &__type {
color: var(--danger-color);
}
&--selected {
background-color: rgba(var(--text-color), 0.08);
.cancel-order {
visibility: hidden;
pointer-events: none;
}
}
sm-checkbox {
cursor: pointer;
margin-right: 0.5rem;
}
&__quantity,
&__price {
font-size: 0.9rem;
color: rgba(var(--text-color), 0.9);
}
&__time {
font-size: 0.8rem;
color: rgba(var(--text-color), 0.8);
}
}
.cancel-order {
align-items: center;
padding: 0.4rem 0.6rem;
span {
margin-left: 0.3rem;
}
}
.transaction-card,
.live-order {
&__type {
font-size: 0.9rem;
font-weight: 500;
margin-bottom: 0.3rem;
}
&[data-type="Bought"] &__type,
&--buy &__type {
color: var(--green);
}
&[data-type="Sold"] &__type,
&--sell &__type {
color: var(--danger-color);
}
&__total {
font-weight: 700;
font-size: 0.9rem;
color: rgba(var(--text-color), 0.8);
}
&__quantity,
&__price {
font-size: 0.9rem;
color: rgba(var(--text-color), 0.9);
}
}
.transaction-card {
content-visibility: auto;
contain-intrinsic-size: 2.5rem;
grid-template-columns: repeat(3, 1fr) 2rem;
}
#market_asset_rates {
display: grid;
gap: 0.5rem;
.listed-asset {
padding: 1rem;
background-color: rgba(var(--text-color), 0.03);
}
}
#market_orders_wrapper {
.list__header {
font-size: 0.8rem;
font-weight: 500;
div {
padding: 0.5rem 0;
}
}
.list__header {
margin-bottom: 0.5rem;
grid-template-columns: repeat(3, 1fr) 2rem;
}
}
.live-order {
display: grid;
gap: 1rem;
padding: 1rem;
border-radius: 0.5rem;
background-color: rgba(var(--text-color), 0.03);
&:not(:last-of-type) {
margin-bottom: 0.5rem;
}
&[data-type="buy"] {
background-color: #00fa9a10;
}
&[data-type="sell"] {
background-color: #e2135110;
}
}
#wallet {
display: grid;
width: auto;
gap: 1.5rem;
grid-template-columns: minmax(0, 1fr);
align-content: flex-start;
}
.wallet_actions__wrapper {
grid-column: span 3;
gap: 0.5rem;
margin-top: 0.5rem;
.button {
flex: 1;
}
}
.label {
font-size: 0.8rem;
color: rgba(var(--text-color), 0.8);
margin-bottom: 0.2rem;
}
#my_assets {
gap: 0.5rem;
margin-top: 0.5rem;
}
.balance-card {
display: grid;
align-items: center;
gap: 0 0.5rem;
border-radius: 0.5rem;
background-color: rgba(var(--foreground-color), 1);
padding: 0.5rem;
&.is-locked {
padding: 1rem 0.5rem;
grid-template-columns: auto 1fr auto;
gap: 0.5rem;
.balance-card__icon {
grid-row: span 2;
}
}
&:not(.is-locked) {
grid-template-columns: auto 1fr auto auto;
}
&__icon {
display: flex;
align-content: center;
justify-content: center;
padding: 0.6rem;
border-radius: 0.8rem;
background-color: var(--accent-color--light);
.icon {
height: 1.3rem;
width: 1.3rem;
fill: var(--accent-color);
}
}
&__token {
font-size: 0.9rem;
font-weight: 500;
}
&__amount-wrapper {
grid-column: 2/3;
gap: 0.3rem 1rem;
grid-template-columns: 1fr 1fr;
& > :nth-child(even) {
text-align: right;
}
}
}
#wallet_result {
justify-content: center;
text-align: center;
&__icon {
display: flex;
padding: 1rem;
border-radius: 50%;
background-color: rgba(var(--text-color), 0.06);
justify-self: center;
animation: pop-up 0.3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
.icon {
height: 2rem;
width: 2rem;
}
}
}
.icon--success {
fill: var(--green);
}
.icon--failure,
.icon--error {
fill: var(--danger-color);
}
@keyframes pop-up {
from {
transform: translateY(3rem) scale(0.5);
opacity: 0;
}
to {
transform: translateY(0) scale(1);
opacity: 1;
}
}
#wallet_result__cta {
padding: 1.5rem 1rem;
border-radius: 0.5rem;
background-color: rgba(var(--text-color), 0.06);
}
.stateful-button-wrapper {
display: flex;
position: relative;
justify-content: center;
align-items: center;
sm-button,
slide-button {
width: 100%;
z-index: 1;
transition: clip-path 0.3s;
clip-path: circle(100%);
&.clip {
pointer-events: none;
clip-path: circle(0);
}
}
sm-spinner {
position: absolute;
}
}
.stateful-result {
overflow: hidden;
position: absolute;
display: flex;
justify-content: center;
align-items: center;
height: 100%;
width: 100%;
left: 0;
& > * {
position: absolute;
}
&--success {
.result__background {
background-color: var(--green);
}
}
&--failure {
.result__background {
background-color: var(--danger-color);
}
}
.icon-wrapper {
animation: pop 0.4s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.icon {
height: 1.5rem;
width: 1.5rem;
fill: rgba(var(--background-color), 1);
}
span {
font-weight: 500;
color: rgba(var(--background-color), 1);
}
.result__background {
animation: ripple-reveal 1s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
}
.result__background {
border-radius: 0.3rem;
height: 100%;
width: 100%;
clip-path: circle(10%);
}
@keyframes pop {
from {
opacity: 0;
transform: translateY(2rem);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes ripple-reveal {
to {
clip-path: circle(100%);
}
}
#help {
width: min(60ch, 100%);
margin-bottom: 3rem;
align-content: flex-start;
}
@media screen and (max-width: 40rem) and (any-hover: none) {
.cancel-order {
span {
display: none !important;
}
}
}
@media screen and (max-width: 40rem) {
sm-button {
--padding: 0.9rem 1.6rem;
}
.empty-state {
align-self: center;
}
.main_navbar__item--active {
.item__title {
transform: translateY(100%);
opacity: 0;
}
.icon {
transform: translateY(50%) scale(1.2);
}
}
.hide-on-mobile {
display: none !important;
}
.listed-asset {
border-radius: 0;
border-bottom: solid thin rgba(var(--text-color), 0.1);
}
#price_chart_container {
flex: 1;
}
}
@media screen and (min-width: 40rem) {
sm-popup {
--width: 24rem;
}
.h1 {
font-size: 2rem;
}
.h2 {
font-size: 1.8rem;
}
.h3 {
font-size: 1.3rem;
}
.h4 {
font-size: 1rem;
}
.popup__header {
padding: 1rem 1.5rem 0 1.5rem;
}
#confirmation_popup {
--width: 24rem;
}
.page-layout {
grid-template-columns: 1fr 90vw 1fr;
}
.mobile-page {
padding: 2rem;
border-radius: 0.5rem;
background-color: rgba(var(--foreground-color), 1);
}
.hide-on-desktop {
display: none !important;
}
#home {
display: grid;
grid-template-columns: auto 1fr;
grid-template-rows: auto 1fr;
grid-template-areas: "header header" "nav pages";
}
#main_header {
grid-area: header;
}
#main_navbar {
grid-area: nav;
flex-direction: column;
height: 100%;
padding-left: 0.5rem;
}
.main_navbar__item {
padding: 1.5rem 2rem 1.5rem 1rem;
width: 100%;
flex: 0;
flex-direction: row;
border-radius: 0.5rem;
transition: background-color 0.3s;
.icon {
margin-bottom: 0;
margin-right: 0.5rem;
}
.item__title {
font-size: 0.9rem;
}
&--active {
background-color: rgba(var(--text-color), 0.06);
}
}
#pages_container {
grid-area: pages;
}
.is-signed-in {
#exchange {
display: flex;
width: 100%;
}
#exchange_wrapper {
display: grid;
width: 100%;
height: 100%;
gap: 1.5rem;
grid-template-columns: 17rem minmax(0, 1fr);
align-items: flex-start;
}
}
#price_history_chart {
height: 20rem;
}
#asset_list_wrapper {
grid-row: 1/3;
}
.listed-asset {
padding: 1rem;
&--active {
opacity: 1;
background-color: rgba(var(--text-color), 0.06);
&::before {
content: "";
position: absolute;
width: 0.25rem;
border-radius: 0 0.2rem 0.2rem 0;
height: 50%;
background-color: var(--accent-color);
}
}
}
}
@media screen and (max-width: 80rem) and (min-width: 40rem) {
.main_navbar__item {
padding: 1.5rem 1rem;
.icon {
margin-right: 0;
}
.item__title {
display: none !important;
}
}
}
@media screen and (min-width: 52rem) {
body:not(.is-signed-in) {
#market {
gap: 2rem;
width: 100%;
grid-template-columns: 18rem 1fr;
}
}
}
@media screen and (min-width: 64rem) {
#home {
grid-template-columns: auto 1fr;
}
#asset_page {
display: grid;
gap: 1.5rem;
grid-template-columns: minmax(0, 1fr) 20rem;
}
#asset_page__nav {
grid-column: 1/-1;
}
#wallet {
gap: 1rem 2rem;
grid-template-columns: 20rem 24rem;
&__header {
grid-column: 1/3;
padding-bottom: 1rem;
}
.balance-card {
border: solid thin rgba(var(--text-color), 0.2);
}
}
}
@media screen and (min-width: 72rem) {
.page-layout {
grid-template-columns: 1fr 80vw 1fr;
}
}
@media screen and (min-width: 120rem) {
.page-layout {
grid-template-columns: 1fr 70vw 1fr;
}
}
@media (any-hover: hover) {
::-webkit-scrollbar {
width: 0.5rem;
height: 0.5rem;
}
::-webkit-scrollbar-thumb {
background: rgba(var(--text-color), 0.3);
border-radius: 1rem;
&:hover {
background: rgba(var(--text-color), 0.5);
}
}
.order-card {
.cancel-order {
justify-self: flex-end;
overflow: hidden;
.icon,
span {
transition: opacity 0.3s, transform 0.3s;
}
.icon {
transform: translateX(100%);
}
span {
transform: translateX(100%);
opacity: 0;
}
}
&:hover,
&:focus-within {
.cancel-order {
.icon {
opacity: 1;
}
}
}
.cancel-order:hover {
.icon,
span {
opacity: 1;
transform: translateX(0);
}
}
}
}