From 8f6a7ac2f6d4ed13229a7e30200b67c77d05396c Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Wed, 3 May 2023 20:32:06 +0000 Subject: [PATCH] Refactor some styling. Trying to move away from so many element-specific classes. --- app/static/styles.css | 55 ++++++++++++++----------------- app/templates/_formhelpers.jinja2 | 2 +- app/templates/base.jinja2 | 38 +++++++++++---------- app/templates/writing.jinja2 | 2 +- 4 files changed, 47 insertions(+), 50 deletions(-) diff --git a/app/static/styles.css b/app/static/styles.css index ff4e3b5..fc62c87 100644 --- a/app/static/styles.css +++ b/app/static/styles.css @@ -136,40 +136,38 @@ div.user form input { padding: 0.3em; } -.white-black-button { +.btn { font-weight: bold; border-radius: 0; border-style: none; - color: black; - background-color: white; +} + +.color-fade { transition-property: color, background-color; transition-duration: 135ms; transition-timing-function: ease-out; } -.white-black-button:hover { +.primary { color: white; background-color: black; } -.black-white-button { - font-weight: bold; - border-radius: 0; - border-style: none; - color: white; - background-color: black; - transition-property: color, background-color; - transition-duration: 135ms; - transition-timing-function: ease-out; - width: min-content; - white-space: nowrap; -} - -.black-white-button:hover { +.primary:hover { color: black; background-color: white; } +.secondary { + color: black; + background-color: white; +} + +.secondary:hover { + color: white; + background-color: black; +} + .logged-in { display: flex; flex-direction: row; @@ -288,8 +286,13 @@ textarea { margin-bottom: 2em; } -.modal-close-button { - position: absolute; +.top-right { + position: absolute; + top: 0; + right: 0; +} + +.text-button { background: none; border: none; font-size: 3rem; @@ -297,11 +300,9 @@ textarea { color: #444; margin: 0.25em; line-height: 100%; - top: 0; - right: 0; } -.modal-close-button:hover { +.text-button:hover { color: #000; } @@ -341,9 +342,6 @@ textarea { .bigtext { min-height: 40vh; } - .login-button { - padding: 0.75em; - } } /* Big screens */ @@ -376,9 +374,6 @@ textarea { padding: 0.5em; height: min-content; } - .login-button { - padding: 0; - } .user { position: absolute; top: 0.5em; @@ -415,4 +410,4 @@ textarea { .scroll-lock { overflow: hidden; -} \ No newline at end of file +} diff --git a/app/templates/_formhelpers.jinja2 b/app/templates/_formhelpers.jinja2 index 7278d8d..7445118 100644 --- a/app/templates/_formhelpers.jinja2 +++ b/app/templates/_formhelpers.jinja2 @@ -38,7 +38,7 @@ {% macro modal() %}