/* You can add global styles to this file, and also import other style files */ @import "./reset.css"; :root { --bg-color: white; --focus-color: forestgreen; --card-bg: white; --success: forestgreen; --failure: indianred; } html, body { height: 100%; margin: 0; } body { font: 21px sans-serif !important; background-color: var(--bg-color); } input:focus, button: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; } #content { /* Used for the login and register pages */ height: 100%; max-width: 20em; box-sizing: border-box; border: 0.5em solid var(--bg-color); margin: 0 auto; display: flex; align-items: center; justify-content: center; flex-direction: column; } #content > *:first-child, #content > *:last-child { flex: 1; } .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; } .error { color: red; } .scroll-standalone { width: 100%; max-height: 100%; overflow-y: auto; } /* 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; } /* Inputs, the type found in login and register */ .input-field { width: 100%; background-color: var(--bg-color); border: 0; border-bottom: 1px solid grey; box-sizing: border-box; margin-bottom: 0.5em; padding: 0.4em; padding-left: 0; font-size: inherit; } .input-field-label { width: inherit; height: inherit; position: absolute; left: 0; margin-top: 0.4em; color: grey; transition: 0.2s; scale: 1em; } .input-selection { position: relative; margin-top: 0.7em; } .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; } /* Submit button */ .submit-btn { width: 100%; color: white; background-color: black; border: 2px solid black; border-radius: 0.4em; box-sizing: border-box; font-size: 0.8em; text-align: center; margin-top: 0.5em; padding: 0.3em; } .submit-btn:hover { cursor: pointer; color: var(--focus-color); background-color: white; border-color: var(--focus-color) !important; } .submit-btn:active { transition: 0s !important; transform: scale(0.9); } .delete-btn:hover { color: indianred; border-color: indianred !important; } /* Form attachments (the ones that are shown while creating and editing a post) */ .form-attachments { display: flex; flex-wrap: wrap; color: gray; font-size: 0.75em; margin: 0 0.3em; } .form-attachment { border: 2px solid black; border-radius: 0.6em; margin-top: 0.2em; margin-right: 0.2em; padding: 0.2em; display: flex; align-items: center; } .form-attachment:last-child { margin-right: 0; } .remove-form-attachment { font-size: 0.9em; color: var(--failure); background-color: white; border-radius: 0.2em; margin: 0 0.2em; padding: 0.2em; } .remove-form-attachment:hover { color: white; background-color: var(--failure); cursor: pointer; }