/* You can add global styles to this file, and also import other style files */ @import "./reset.css"; :root { --max-width: 40rem; --bg-color: #18191a; --fg-color: #ffeede; --focus-color: #669908; --card-bg: #303030; --card-padding: 0.5em; --success: #669908; --failure: indianred; --faded-color: #696969; --navbar-height: 2.6em; --upvote-highlight: #999908; --downvote-highlight: #c35b5b; } html, body { height: 100%; margin: 0; } body { font: 21px sans-serif !important; color: var(--fg-color); background-color: var(--bg-color); } button, textarea, input { color: inherit; background: inherit; background-color: inherit; font: inherit; padding: 0; border: none; } input:focus, button:focus, textarea:focus { outline: 0; } /* We can't do ...::-webkit-file-upload-button, ...::file-selector-button {...} * for some reason, so they have to be separated (some browsers break) */ input[type=file]::-webkit-file-upload-button { visibility: hidden; } input[type=file]::file-selector-button { visibility: hidden; } .rounded-border { border: 2px solid black; border-radius: 0.6em; padding: 0.4em; } .round-image { border-radius: 50%; object-fit: cover; } .title { font-size: 2em; font-weight: bold; text-align: center; } .error { color: red; } .scroll-standalone { width: 100%; max-height: 100%; overflow-y: auto; flex-wrap: nowrap !important; } /* Hide scrollbar for Chrome, Safari and Opera */ .scroll-standalone::-webkit-scrollbar { display: none; } /* Hide scrollbar for IE, Edge and Firefox */ .scroll-standalone { -ms-overflow-style: none; /* IE and Edge */ scrollbar-width: none; /* Firefox */ } .user-language, .user-technology { border-radius: 0.4em; background-color: lightgrey; padding: 0.26em; margin: 0.1em 0.2em; width: fit-content; } /* Cards */ .card { margin: 0.5em auto; box-sizing: border-box; padding: var(--card-padding); background-color: var(--card-bg); position: relative; } @media screen and (max-width: 30rem) { .card { font-size: 0.8em; } .card button { font-size: 0.9em; } .title { font-size: 1.5em; } .input-selection:first-child { margin-top: 1.2em !important; } :not(card) button { font-size: 0.7em; } } .card-hr { width: calc(100% - 1em); border: 1px solid var(--fg-color); background-color: var(--fg-color); } /* General flex */ .flex-row, .flex-col { display: flex; flex-wrap: wrap; } .flex-no-wrap { flex-wrap: nowrap; } .flex-row { flex-direction: row; } .flex-col { flex-direction: column; } .flexible, .flexible-children > * { flex: 1; } .flex-center-align-items { align-items: center; } .flex-justify-start { justify-content: flex-start; } .flex-justify-end { justify-content: flex-end; } .flex-justify-center { justify-content: center; } .flex-center-align-children > * { display: flex; align-items: center; } .justify-children-center > * { display: flex; justify-content: center; } /* General font sizes */ .font-size-dot9 { font-size: 0.9em; } .font-size-dot8 { font-size: 0.8em; } .font-size-dot7 { font-size: 0.7em; } .img-height-font-size { height: 1em; } /* General colors */ .fg-color-faded { color: var(--faded-color); } /* General text */ .text-centered { text-align: center; } .text-vertical-middle { vertical-align: middle; } /* General border */ .faded-slim-border { border: 1px solid var(--faded-color); } .border-radius-normal, .card { border-radius: 0.5rem; } .border-radius-smaller { border-radius: 0.3em; } .border-radius-small { border-radius: 0.2em; } .border-bottom-only { border-top: none; border-left: none; border-right: none; } /* General padding */ .padding-big { padding: 0.6em; } .padding-bigger { padding: 0.5em; } .padding-normal { padding: 0.4em; } .padding-smaller { padding: 0.3em; } .padding-small { padding: 0.2em; } .padding-tiny { padding: 0.1em; } .side-padding-smaller { padding-right: 0.3em; padding-left: 0.3em; } .bot-padding-bigger { padding-bottom: 0.5em; } .top-bot-padding-bigger { padding-top: 0.5em; padding-bottom: 0.5em; } .top-bot-padding-small { padding-top: 0.2em; padding-bottom: 0.2em; } /* Margin */ .no-margin { margin: 0; } .no-margin-top { margin-top: 0; } .margin-top-normal { margin-top: 0.4em; } .margin-top-bigger { margin-top: 0.5em; } .margin-bot-bigger { margin-bottom: 0.5em; } .margin-top-bot-small { margin-top: 0.2em; margin-bottom: 0.2em; } .margin-right-small { margin-right: 0.2em; } /* Effects */ .lighter-hover:hover, .light-hover:hover, .hover-half-opacity:hover { cursor: pointer; } .lighter-hover:hover { background: #424242; } .light-hover:hover { background: #696969; } .hover-half-opacity:hover { opacity: 0.5; } .click-effect:active { transform: scale(0.9); } /* Misc */ .full-height { height: 100%; } .full-width { width: 100%; } .centered-content { max-width: var(--max-width); margin: 0 auto; box-sizing: border-box; } .under-navbar { height: calc(100% - var(--navbar-height)) !important; } .focus-fg-color { color: var(--focus-color); border-color: var(--focus-color); } /* Inputs, the type found in login and register */ .textarea-new-msg { min-height: 2em; resize: vertical; box-sizing: border-box; } .fancy-input { box-sizing: border-box; margin-bottom: 0.5em; padding: 0.4em; padding-left: 0; } .fancy-input-label { width: inherit; height: inherit; position: absolute; left: 0; margin-top: 0.4em; transition: 0.2s; scale: 1em; } .input-selection { position: relative; margin-top: 0.5em; } .input-selection input::placeholder { /* Don't show the placeholder when the label is on top */ opacity: 0; color: grey; } .input-selection:hover > input::placeholder, .input-selection > input:focus::placeholder { /* When hovering on the input, or when having clicked on it, * show the placeholder */ opacity: 1; } .input-selection:hover > label, .input-selection > input:not(:placeholder-shown) + label, .input-selection > input:focus + label { /* When hovering, typing or having typed something in an input, * make the label smaller, color it and then move it up */ font-size: 0.7em; color: var(--focus-color); transform: translate(0, -1.2em); } .input-selection:hover > input, .input-selection > input:focus { /* When hovering or clicked on it, make it the focus color */ border-color: var(--focus-color) !important; caret-color: var(--focus-color); /* When hovering or clicked on it, make the bottom border wider (taller) */ border-width: 2px; padding-bottom: calc(0.4em - 1px); } /* Input errors */ .input-errors { margin-top: -0.8em; font-size: 0.7em; position: absolute; right: 0; top: 0; } /* Move the errors above the input when * using the site on a small screen and * add some space for them above the input */ @media screen and (max-width: 350px) { .input-errors { margin-top: -1.8em; } .input-selection { margin-top: 1.6em; } } .input-errors > .error { margin-left: 0.3em; } .input-field:focus ~ .input-errors > .error { opacity: 1 !important; } .input-field:placeholder-shown ~ .input-errors > .error { opacity: 0; } /* Form attachments (the ones that are shown while creating and editing a post) */ .form-attachment { background-color: #424242; }