From ae9273cdfff73003cb6ec79c7323fb3f061c7e59 Mon Sep 17 00:00:00 2001 From: liquidev Date: Tue, 10 Dec 2024 23:21:36 +0100 Subject: [PATCH] change units in CSS to properly scaled rem yeah I should've done that from the start should have I --- static/css/base.css | 14 ---- static/css/components/chat.css | 30 +++---- static/css/main.css | 145 +++++++++++++++++---------------- static/css/page/index.css | 2 +- static/css/page/tairu.css | 28 +++---- static/css/tree.css | 63 +++++++------- 6 files changed, 138 insertions(+), 144 deletions(-) diff --git a/static/css/base.css b/static/css/base.css index b7eb4e4..60c933e 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -40,20 +40,6 @@ } } -:root { - /* Font size-responsive measurements. treehouse was designed against a font size of 14px; - each of these sizes is (n / 14)rem where n is the number of pixels. */ - --1px: 0.07142857143rem; - --2px: 0.1428571429rem; - --3px: 0.2142857143rem; - --4px: 0.2857142857rem; - --6px: 0.4285714286rem; - --8px: 0.5714285714rem; - --10px: 0.7142857143rem; - --12px: 0.8571428571rem; - --16px: 1.142857143rem; -} - /* Reset things to more sensible sizing rules */ * { diff --git a/static/css/components/chat.css b/static/css/components/chat.css index 966c5e3..0c9e1e5 100644 --- a/static/css/components/chat.css +++ b/static/css/components/chat.css @@ -1,10 +1,10 @@ :root { - --icon-choose: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYgMTJMMTAgOEw2IDQiIHN0cm9rZT0iIzU1NDIzZSIgc3Ryb2tlLXdpZHRoPSIyIi8+Cjwvc3ZnPgo='); + --icon-choose: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYgMTJMMTAgOEw2IDQiIHN0cm9rZT0iIzU1NDIzZSIgc3Ryb2tlLXdpZHRoPSIyIi8+Cjwvc3ZnPgo="); } @media (prefers-color-scheme: dark) { :root { - --icon-choose: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYgMTJMMTAgOEw2IDQiIHN0cm9rZT0iI2Q3Y2RiZiIgc3Ryb2tlLXdpZHRoPSIyIi8+Cjwvc3ZnPgo='); + --icon-choose: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYgMTJMMTAgOEw2IDQiIHN0cm9rZT0iI2Q3Y2RiZiIgc3Ryb2tlLXdpZHRoPSIyIi8+Cjwvc3ZnPgo="); } } @@ -18,19 +18,19 @@ th-chat-said { flex-direction: row; align-items: center; - border: var(--1px) solid var(--border-1); - padding: var(--12px) var(--16px); - margin: var(--8px) 0; - border-radius: var(--8px); + border: 0.1rem solid var(--border-1); + padding: 1.2rem 1.6rem; + margin: 0.8rem 0; + border-radius: 0.8rem; max-width: 60%; - &>.picture { - padding-right: var(--16px); + & > .picture { + padding-right: 1.6rem; align-self: baseline; } - &>.text-container { + & > .text-container { display: inline-block; } } @@ -39,7 +39,7 @@ th-chat-asked { display: flex; flex-direction: row-reverse; - &>button { + & > button { /* Reset