From c7b4f0eb3493ffbaa330aa67762355dbf37ec008 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 4 Mar 2021 16:58:35 +0200 Subject: Fixed sizing twitch of input fields on non-chromium based browsers (FireFox) --- src/app/components/login/login.component.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/app/components/login/login.component.css') diff --git a/src/app/components/login/login.component.css b/src/app/components/login/login.component.css index 766522e..103f5c0 100644 --- a/src/app/components/login/login.component.css +++ b/src/app/components/login/login.component.css @@ -1,7 +1,3 @@ -* { - transition: .2s; -} - form { width: 100%; } @@ -12,6 +8,10 @@ form { box-sizing: border-box; } +.submit-btn { + transition: 0.2s; +} + .input-selection:nth-of-type(1) { margin-top: 1.2em; } -- cgit v1.2.3 From 17a8110e3e0450a88207b9b8b05ebde166a433bc Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 21 Mar 2021 13:50:39 +0200 Subject: Major redesign of login component styling --- src/app/components/login/login.component.css | 28 +---- src/app/components/login/login.component.html | 27 ++--- src/styles.css | 164 +++++++++++--------------- 3 files changed, 84 insertions(+), 135 deletions(-) (limited to 'src/app/components/login/login.component.css') diff --git a/src/app/components/login/login.component.css b/src/app/components/login/login.component.css index 103f5c0..3cd7198 100644 --- a/src/app/components/login/login.component.css +++ b/src/app/components/login/login.component.css @@ -1,32 +1,8 @@ -form { - width: 100%; -} - -#content hr { - width: 100%; - border: 1px solid black; - box-sizing: border-box; -} - -.submit-btn { - transition: 0.2s; -} - -.input-selection:nth-of-type(1) { - margin-top: 1.2em; -} - -.submit-btn { - margin-bottom: .2em; +.input-selection:first-of-type { + margin-top: 0.5em; } .redirect-to-register { color: var(--focus-color); - background-color: var(--bg-color); border-color: var(--focus-color); } - -.redirect-to-register:hover { - border-color: black !important; - color: black; -} diff --git a/src/app/components/login/login.component.html b/src/app/components/login/login.component.html index 9f74faa..5ed1ac8 100644 --- a/src/app/components/login/login.component.html +++ b/src/app/components/login/login.component.html @@ -1,30 +1,25 @@ -
- Login +
+ Login -
-
- -
- - + + +
+ +
-
- - - + +
-
- - + - +
diff --git a/src/styles.css b/src/styles.css index c06a9bd..93ed57b 100644 --- a/src/styles.css +++ b/src/styles.css @@ -5,10 +5,10 @@ --max-width: 40rem; --bg-color: #18191a; --fg-color: #ffeede; - --focus-color: forestgreen; + --focus-color: #669908; --card-bg: #303030; --card-padding: 0.5em; - --success: forestgreen; + --success: #669908; --failure: indianred; --faded-color: #696969; --navbar-height: 2.6em; @@ -53,21 +53,6 @@ input[type=file]::file-selector-button { visibility: hidden; } -#content { - /* Used for the login and register pages */ - height: 100%; - max-width: var(--max-width); - 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; -} - .rounded-border { border: 2px solid black; border-radius: 0.6em; @@ -82,6 +67,7 @@ input[type=file]::file-selector-button { .title { font-size: 2em; font-weight: bold; + text-align: center; } .error { @@ -115,6 +101,44 @@ input[type=file]::file-selector-button { 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 { @@ -205,7 +229,7 @@ input[type=file]::file-selector-button { } .border-radius-normal, .card { - border-radius: 0.5em; + border-radius: 0.5rem; } .border-radius-smaller { @@ -224,6 +248,14 @@ input[type=file]::file-selector-button { /* General padding */ +.padding-big { + padding: 0.6em; +} + +.padding-bigger { + padding: 0.5em; +} + .padding-normal { padding: 0.4em; } @@ -252,6 +284,14 @@ input[type=file]::file-selector-button { /* Margin */ +.no-margin { + margin: 0; +} + +.margin-top-normal { + margin-top: 0.4em; +} + .margin-top-bot-small { margin-top: 0.2em; margin-bottom: 0.2em; @@ -261,32 +301,6 @@ input[type=file]::file-selector-button { margin-right: 0.2em; } -/* 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; - } -} - -.card-hr { - width: calc(100% - 1em); - border: 1px solid var(--fg-color); - background-color: var(--fg-color); -} - /* Effects */ .lighter-hover:hover, .light-hover:hover, .hover-half-opacity:hover { @@ -311,6 +325,10 @@ input[type=file]::file-selector-button { /* Misc */ +.full-height { + height: 100%; +} + .full-width { width: 100%; } @@ -325,39 +343,34 @@ input[type=file]::file-selector-button { height: calc(100% - var(--navbar-height)) !important; } -/* Inputs, the type found in login and register */ +.focus-fg-color { + color: var(--focus-color); + border-color: var(--focus-color); +} -.input-field { - width: 100%; - background-color: var(--bg-color); +/* Inputs, the type found in login and register */ - border: 0; - border-bottom: 1px solid grey; +.fancy-input { box-sizing: border-box; - margin-bottom: 0.5em; padding: 0.4em; padding-left: 0; - - font-size: inherit; } -.input-field-label { +.fancy-input-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; + margin-top: 0.5em; } .input-selection input::placeholder { @@ -406,7 +419,7 @@ input[type=file]::file-selector-button { top: 0; } -/* Move the errors above the input when + /* Move the errors above the input when * using the site on a small screen and * add some space for them above the input */ @@ -431,41 +444,6 @@ input[type=file]::file-selector-button { 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 { -- cgit v1.2.3 From 05f0129fbcf5421b3b0acab0429c8dbbb5737ba4 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 22 Mar 2021 15:12:01 +0200 Subject: Removed unused css styling in register and login components --- src/app/components/login/login.component.css | 8 ----- src/app/components/register/register.component.css | 40 ---------------------- 2 files changed, 48 deletions(-) (limited to 'src/app/components/login/login.component.css') diff --git a/src/app/components/login/login.component.css b/src/app/components/login/login.component.css index 3cd7198..e69de29 100644 --- a/src/app/components/login/login.component.css +++ b/src/app/components/login/login.component.css @@ -1,8 +0,0 @@ -.input-selection:first-of-type { - margin-top: 0.5em; -} - -.redirect-to-register { - color: var(--focus-color); - border-color: var(--focus-color); -} diff --git a/src/app/components/register/register.component.css b/src/app/components/register/register.component.css index 973c6f0..e69de29 100644 --- a/src/app/components/register/register.component.css +++ b/src/app/components/register/register.component.css @@ -1,40 +0,0 @@ -/* A lot of stuff are moved to the global styles! */ - -form { - width: 100%; -} - -@media screen and (max-height: 630px) { - #content { - height: fit-content !important; - } -} - -#content hr { - width: 100%; - border: 1px solid black; - box-sizing: border-box; -} - -.submit-btn { - transition: 0.2s; -} - -.input-selection:nth-of-type(1) { - margin-top: 1.2em; -} - -.submit-btn { - margin-bottom: .2em; -} - -.redirect-to-login { - color: var(--focus-color); - background-color: var(--bg-color); - border-color: var(--focus-color); -} - -.redirect-to-login:hover { - border-color: black !important; - color: black; -} -- cgit v1.2.3