mango-ui-v2/styles/index.css

297 lines
6.5 KiB
CSS

@tailwind base;
@tailwind components;
@tailwind utilities;
/* Theme */
:root {
--primary: theme('colors.light-theme.orange');
--red: theme('colors.light-theme.red.DEFAULT');
--red-dark: theme('colors.light-theme.red.dark');
--green: theme('colors.light-theme.green.DEFAULT');
--green-dark: theme('colors.light-theme.green.dark');
--orange: theme('colors.light-theme.orange');
--bkg-1: theme('colors.light-theme["bkg-1"]');
--bkg-2: theme('colors.light-theme["bkg-2"]');
--bkg-3: theme('colors.light-theme["bkg-3"]');
--fgd-1: theme('colors.light-theme["fgd-1"]');
--fgd-2: theme('colors.light-theme["fgd-2"]');
--fgd-3: theme('colors.light-theme["fgd-3"]');
--fgd-4: theme('colors.light-theme["fgd-4"]');
}
[data-theme='Dark'] {
--primary: theme('colors.dark-theme.yellow');
--red: theme('colors.dark-theme.red.DEFAULT');
--red-dark: theme('colors.dark-theme.red.dark');
--green: theme('colors.dark-theme.green.DEFAULT');
--green-dark: theme('colors.dark-theme.green.dark');
--orange: theme('colors.dark-theme.orange.DEFAULT');
--bkg-1: theme('colors.dark-theme["bkg-1"]');
--bkg-2: theme('colors.dark-theme["bkg-2"]');
--bkg-3: theme('colors.dark-theme["bkg-3"]');
--fgd-1: theme('colors.dark-theme["fgd-1"]');
--fgd-2: theme('colors.dark-theme["fgd-2"]');
--fgd-3: theme('colors.dark-theme["fgd-3"]');
--fgd-4: theme('colors.dark-theme["fgd-4"]');
}
[data-theme='Mango'] {
--primary: theme('colors.mango-theme.yellow');
--red: theme('colors.mango-theme.red.DEFAULT');
--red-dark: theme('colors.mango-theme.red.dark');
--green: theme('colors.mango-theme.green.DEFAULT');
--green-dark: theme('colors.mango-theme.green.dark');
--orange: theme('colors.mango-theme.orange.DEFAULT');
--bkg-1: theme('colors.mango-theme["bkg-1"]');
--bkg-2: theme('colors.mango-theme["bkg-2"]');
--bkg-3: theme('colors.mango-theme["bkg-3"]');
--fgd-1: theme('colors.mango-theme["fgd-1"]');
--fgd-2: theme('colors.mango-theme["fgd-2"]');
--fgd-3: theme('colors.mango-theme["fgd-3"]');
--fgd-4: theme('colors.mango-theme["fgd-4"]');
}
/* Base */
body {
@apply text-sm font-body tracking-wider;
}
p {
@apply text-th-fgd-3 mb-2.5;
}
a {
@apply text-th-primary transition-all duration-300 hover:opacity-70;
}
button {
transition: all 0.3s ease;
@apply font-semibold rounded-md tracking-wider;
}
.default-transition {
@apply transition-all duration-300;
}
/* Chart */
.TVChartContainer {
height: 100%;
width: 100%;
}
.tradingview-chart {
display: contents;
}
/* Grid */
.react-grid-item.react-grid-placeholder {
background: var(--bkg-3);
opacity: 90%;
border-radius: 8px;
transition-duration: 100ms;
z-index: 2;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
.react-resizable-handle {
background-image: none;
z-index: 100;
}
.react-grid-item > .react-resizable-handle {
width: 24px;
height: 24px;
}
.react-grid-item > .react-resizable-handle::after {
content: '';
position: absolute;
right: 8px;
bottom: 0;
width: 8px;
height: 8px;
border-right: 3px solid var(--primary);
border-bottom: 3px solid var(--primary);
border-radius: 1px;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type='number'] {
-moz-appearance: textfield;
}
/* Scrollbars */
.thin-scroll::-webkit-scrollbar {
width: 4px;
height: 8px;
background-color: var(--bkg-2);
}
.thin-scroll::-webkit-scrollbar-thumb {
border-radius: 4px;
background-color: var(--bkg-3);
}
.thin-scroll::-webkit-scrollbar-track {
background-color: inherit;
}
.thin-scroll::-webkit-scrollbar-corner {
background-color: var(--bkg-3);
}
/* Responsive table */
/* inspired by: https://css-tricks.com/responsive-data-tables/ */
.responsiveTable {
width: 100%;
}
.responsiveTable td .tdBefore {
display: none;
}
@media screen and (max-width: 767px) {
.responsiveTable table,
.responsiveTable thead,
.responsiveTable tbody,
.responsiveTable th,
.responsiveTable td,
.responsiveTable tr {
display: block;
}
.responsiveTable thead tr {
position: absolute;
top: -9999px;
left: -9999px;
border-bottom: 2px solid #333;
}
.responsiveTable tbody tr {
@apply px-4;
}
.responsiveTable td.pivoted {
/* Behave like a "row" */
@apply pb-1;
position: relative;
padding-left: calc(50% + 10px) !important;
text-align: left !important;
white-space: pre-wrap;
overflow-wrap: break-word;
}
.responsiveTable td.pivoted:last-child {
/* Behave like a "row" */
@apply pb-4;
}
.responsiveTable td.pivoted:last-child {
/* Behave like a "row" */
@apply border-b-0;
}
.responsiveTable td .tdBefore {
/* Now like a table header */
@apply text-th-fgd-3 font-normal;
position: absolute;
display: block;
/* Top/left values mimic padding */
left: 1rem;
width: calc(50% - 20px);
white-space: pre-wrap;
overflow-wrap: break-word;
text-align: left !important;
}
}
/* phone input */
.react-tel-input .form-control:hover + div {
border-right: 1px solid var(--primary) !important;
}
.react-tel-input .form-control:focus + div {
border-right: 1px solid var(--primary) !important;
}
.react-tel-input .selected-flag:hover {
background-color: transparent !important;
}
.react-tel-input .flag-dropdown .open {
background-color: transparent !important;
}
.react-tel-input .flag-dropdown:active {
background-color: transparent !important;
}
.react-tel-input .country-list .country:hover {
background-color: var(--bkg-3) !important;
}
.react-tel-input .country-list .highlight {
background-color: var(--bkg-3) !important;
}
.react-tel-input .country-list {
margin: 8px 0 10px -6px !important;
}
.react-tel-input .selected-flag:hover,
.react-tel-input .selected-flag:focus,
.react-tel-input .selected-flag.open {
background-color: transparent !important;
}
/* orderbook flash */
@keyframes highlight {
from {
background-color: var(--primary);
}
to {
background-color: transparent;
}
}
@-webkit-keyframes highlight {
from {
background-color: var(--primary);
}
to {
background-color: transparent;
}
}
@-moz-keyframes highlight {
from {
background-color: var(--primary);
}
to {
background-color: transparent;
}
}
.flash {
-moz-animation: highlight 0.5s ease 0s 1 alternate;
-webkit-animation: highlight 0.5s ease 0s 1 alternate;
animation: highlight 0.5s ease 0s 1 alternate;
}