@tailwind base; @tailwind components; @tailwind utilities; /* Reset */ html, body, p, ol, ul, li, dl, dt, dd, blockquote, figure, fieldset, legend, textarea, pre, iframe, hr, h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; } h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: normal; } ul { list-style: none; } button, input, select { margin: 0; } html { box-sizing: border-box; } *, *::before, *::after { box-sizing: inherit; } img, video { height: auto; max-width: 100%; } iframe { border: 0; } table { border-collapse: collapse; border-spacing: 0; } td, th { padding: 0; } /* Theme */ :root { --active: theme('colors.light-theme.active.DEFAULT'); --active-dark: theme('colors.light-theme.active.dark'); --link: theme('colors.light-theme.link.DEFAULT'); --link-hover: theme('colors.light-theme.link.hover'); --bkg-1: theme('colors.light-theme.bkg-1'); --bkg-2: theme('colors.light-theme.bkg-2'); --bkg-3: theme('colors.light-theme.bkg-3'); --bkg-4: theme('colors.light-theme.bkg-4'); --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'); --button: theme('colors.light-theme.button.DEFAULT'); --input-bkg: theme('colors.light-theme.input.bkg'); --input-border: theme('colors.light-theme.input.border'); --input-border-hover: theme('colors.light-theme.input.borderDark'); --button-hover: theme('colors.light-theme.button.hover'); --error: theme('colors.light-theme.error'); --success: theme('colors.light-theme.success'); --warning: theme('colors.light-theme.warning'); --primary-1: theme('colors.light-theme.primary-1'); --primary-2: theme('colors.light-theme.primary-2'); --primary-3: theme('colors.light-theme.primary-3'); --primary-4: theme('colors.light-theme.primary-4'); } [data-theme='Dark'] { --active: theme('colors.dark-theme.active.DEFAULT'); --active-dark: theme('colors.dark-theme.active.dark'); --link: theme('colors.dark-theme.link.DEFAULT'); --link-hover: theme('colors.dark-theme.link.hover'); --bkg-1: theme('colors.dark-theme.bkg-1'); --bkg-2: theme('colors.dark-theme.bkg-2'); --bkg-3: theme('colors.dark-theme.bkg-3'); --bkg-4: theme('colors.dark-theme.bkg-4'); --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'); --button: theme('colors.dark-theme.button.DEFAULT'); --button-hover: theme('colors.dark-theme.button.hover'); --input-bkg: theme('colors.dark-theme.input.bkg'); --input-border: theme('colors.dark-theme.input.border'); --input-border-hover: theme('colors.dark-theme.input.borderDark'); --error: theme('colors.dark-theme.error'); --success: theme('colors.dark-theme.success'); --warning: theme('colors.dark-theme.warning'); --primary-1: theme('colors.dark-theme.primary-1'); --primary-2: theme('colors.dark-theme.primary-2'); --primary-3: theme('colors.dark-theme.primary-3'); --primary-4: theme('colors.dark-theme.primary-4'); } /* Base */ body { @apply bg-th-primary-1 font-body text-base font-normal leading-tight tracking-wide text-th-fgd-1; /* -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; */ } main { @apply font-body; } button { @apply tracking-wide focus:outline-none; -webkit-font-feature-settings: 'zero' 1; font-feature-settings: 'zero' 1; } svg { @apply transition duration-500 ease-out; } .default-transition { @apply transition duration-300 ease-out; } /* Type */ h1, h2, h3 { @apply font-extrabold; } h1 { @apply text-2xl; } h2 { @apply text-xl; } h3 { @apply text-lg; } h4 { @apply text-base font-bold; } p { @apply leading-snug text-th-fgd-1; } li { @apply text-base text-th-fgd-3; } a { @apply default-transition text-th-link focus:outline-none md:hover:text-th-link-hover; } /* Forms */ input { @apply default-transition; } input::placeholder { @apply text-th-bkg-4; } /* Remove inner shadow from inputs on mobile iOS */ textarea, input[type='text'] { -webkit-appearance: none; } /* Animations */ @keyframes sideways-bounce { 0%, 100% { transform: translateX(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); } 50% { transform: translateX(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); } } .sideways-bounce { animation: sideways-bounce 1s infinite; } /* Table */ table p { @apply font-mono text-base text-th-fgd-2; } .font-display { @apply tracking-wide; } .font-mono { @apply font-semibold; -webkit-font-feature-settings: 'zero' 1; font-feature-settings: 'zero' 1; } /* Scrollbars */ .hide-scroll::-webkit-scrollbar { width: 0px; height: 0px; -webkit-appearance: none; } .hide-scroll::-webkit-scrollbar-thumb { border: 0px solid transparent; background-clip: padding-box; } .hide-scroll::-webkit-scrollbar-thumb:hover { border: 0; } .hide-scroll::-webkit-scrollbar-track { background: transparent; } .thin-scroll::-webkit-scrollbar { width: 8px; height: 8px; } .thin-scroll::-webkit-scrollbar-thumb { @apply rounded bg-th-bkg-4; border: 2px solid transparent; background-clip: padding-box; } .thin-scroll::-webkit-scrollbar-thumb:hover { border: 0; } .thin-scroll::-webkit-scrollbar-track { background: transparent; } .thin-scroll::-webkit-scrollbar-thumb:window-inactive { @apply bg-th-bkg-4; } /* slider */ #range-slider-gradient { @apply h-3.5 rounded-full bg-th-bkg-2 shadow-[inset_0_2px_0px_rgba(0,0,0,0.15)] ring-[1px] ring-inset ring-th-bkg-3; } #range-slider-gradient .range-slider__thumb[data-lower] { width: 0; } #range-slider-gradient .range-slider__thumb[data-upper] { @apply h-7 w-4 rounded-full border border-th-primary-3 bg-th-primary-1 shadow-[inset_0_-3px_0px_rgba(0,0,0,0.15)]; } #range-slider-gradient .range-slider__range { @apply rounded-full bg-gradient-to-r from-th-success via-th-active to-th-error shadow-[inset_0_2px_0px_rgba(0,0,0,0.15)]; background-size: 200% 100%; background-position: 50% 0; } #range-slider-gradient .range-slider__range[data-active], #range-slider-gradient .range-slider__thumb[data-active] ~ .range-slider__range { animation: move-bg 3s infinite linear; } @keyframes move-bg { 0% { background-position: 50% 0; } 25% { background-position: 100% 0; } 50% { background-position: 50% 0; } 75% { background-position: 0% 0; } 100% { background-position: 50% 0; } } .tooltip-underline { @apply default-transition w-max border-b border-dashed border-current hover:cursor-help hover:border-transparent; } /* raised buttons */ .raised-button { @apply relative z-10 transition-none; } .raised-button:after { @apply absolute left-0 h-full w-full bg-th-button; content: ''; box-shadow: 0 4px var(--button-hover); z-index: -1; } .raised-button:hover:after { background-color: var(--button); box-shadow: 0 2px var(--button-hover); top: 2px; } .raised-button:active:after { box-shadow: 0 0 var(--button-hover); top: 4px; } .raised-button-neutral { @apply relative z-10 transition-none; } .raised-button-neutral:after { @apply absolute left-0 top-0 h-full w-full bg-th-bkg-1; content: ''; box-shadow: 0 4px var(--bkg-3); z-index: -1; } .raised-button-neutral:hover:after { background-color: var(--bkg-1); box-shadow: 0 2px var(--bkg-3); top: 2px; } .raised-button-neutral:active:after { box-shadow: 0 0 var(--bkg-3); top: 4px; } /* shadows */ .inner-shadow-top { @apply shadow-[inset_0_4px_0px_rgba(0,0,0,0.15)]; } .inner-shadow-bottom { @apply shadow-[inset_0_-4px_0px_rgba(0,0,0,0.15)]; } .inner-shadow-top-sm { @apply shadow-[inset_0_2px_0px_rgba(0,0,0,0.15)]; } .inner-shadow-bottom-sm { @apply shadow-[inset_0_-2px_0px_rgba(0,0,0,0.15)]; } .inner-shadow-top-xs { @apply shadow-[inset_0_1px_0px_rgba(0,0,0,0.15)]; } .inner-shadow-bottom-xs { @apply shadow-[inset_0_-1px_0px_rgba(0,0,0,0.15)]; } .text-shadow { text-shadow: 2px 2px 0 var(--fgd-1), -1px -1px 0 var(--fgd-1), 1px -1px 0 var(--fgd-1), -1px 1px 0 var(--fgd-1), 1px 1px 0 var(--fgd-1); -webkit-text-shadow: 2px 2px 0 var(--fgd-1), -1px -1px 0 var(--fgd-1), 1px -1px 0 var(--fgd-1), -1px 1px 0 var(--fgd-1), 1px 1px 0 var(--fgd-1); } .icon-shadow { @apply stroke-th-fgd-1 stroke-1 drop-shadow-[1px_1px_0_rgba(0,0,0,1)]; } /* background */ @keyframes rotate-bg { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .rotate-bg-1x { animation: rotate-bg 720s linear infinite; } .rotate-bg-2x { animation: rotate-bg 40s linear infinite; } .rotate-bg-3x { animation: rotate-bg 20s linear infinite; } .rotate-bg-4x { animation: rotate-bg 7s linear infinite; } .rotate-bg-5x { animation: rotate-bg 3s linear infinite; }