@import…
- User
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700&family=Lora:wght@400;700&display=swap');
:root { /* --- Background Colors --- */ --color-background: #f9f6f2; --color-header-bg: #DAD2C6; --color-tab-bg: #F5F0E9; --color-group-bg: #EDE6D6;
/* --- Text Colors --- */ --color-text-primary: #333333; --color-text-secondary: #4A3F35; --color-text-accent: #7A6A5E; --color-text-light: #f9f6f2; /* --- Button Colors --- */ --color-button-primary: #6B4F4F; --color-button-primary-hover: #8C6E6E; --color-button-remove: #A0522D; --color-button-remove-hover: #8B4513; --color-button-restore: #2E8B57; --color-button-restore-hover: #3CB371; /* --- Move Here Button Colors --- */ --color-moveHere-bg: #C1B7A4; --color-moveHere-hover-bg: #D1C4B7; /* --- Border Colors --- */ --color-border-header: #BFAFA1; --color-border-tab: #E0DCCF; --color-border-search: #A89F91; /* --- Other Colors --- */ --color-shadow: rgba(0, 0, 0, 0.1);}
body { font-family: 'Merriweather', serif; background-color: var(--color-background); color: var(--color-text-primary); margin: 0; padding: 0; }
h2 { font-family: 'Lora', serif; color: var(--color-text-secondary); }
button { background-color: var(--color-button-primary); padding: 8px 16px; color: var(--color-text-light); border: none; border-radius: 4px; cursor: pointer; font-size: 14px; margin: 0px 5px; transition: background-color 0.3s ease, color 0.3s ease; }
button:hover { background-color: var(--color-button-primary-hover); }
input[type="checkbox"] { background-color: var(--color-background); cursor: pointer; }
#resultMessage { text-align: center; margin-top: 20px; color: var(--color-text-accent); }
#pageHeader { position: fixed; top: 0; left: 0; right: 0; height: 50px; z-index: 1000; display: flex; align-items: center; justify-content: space-between; background-color: var(--color-header-bg); padding: 15px 40px; border-bottom: 1px solid var(--color-border-header); box-shadow: 0 2px 4px var(--color-shadow); }
#headerLeft, #headerCenter, #headerRight { flex: 1; display: flex; align-items: center; }
#headerCenter { justify-content: center; }
#headerRight { justify-content: flex-end; }
#homeLink { font-size: 28px; font-weight: 700; text-decoration: none; color: var(--color-text-secondary); }
#homeLink:hover { text-decoration: underline; }
#searchInput { width: 100%; max-width: 400px; padding: 10px 14px; font-size: 16px; border: 2px solid var(--color-border-search); border-radius: 4px; background-color: var(--color-background); color: var(--color-text-primary); }
#searchInput:focus { outline: none !important; border: 3px solid var(--color-button-primary); padding: 9px 13px; }
- Assistant
This stylesheet defines a set of styles for a web page, focusing on typography, colors, and layout. Here's a breakdown of the key elements defined in this CSS:
- User
I want a dark theme based on that palette. Can you do that?
- Assistant
- User
The "color-button-primary" variable doesn't suit the dark theme. Can you change that?
- Assistant
Certainly! To better suit the dark theme, let's adjust the
--color-button-primaryvariable to a tone that provides better contrast and aesthetic compatibility with the darker palette. Let's use a slightly brighter shade that can stand out against the dark background. Here's an updated version of the relevant CSS variables::root { /* --- Background Colors --- */ --color-background: #1e1e1e; --color-header-bg: #2c2c2c; --color-tab-bg: #3a3a3a; --color-group-bg: #333333; /* --- Text Colors --- */ --color-text-primary: #f9f6f2; --color-text-secondary: #d4d4d4; --color-text-accent: #e0e0e0; --color-text-light: #333333; /* --- Button Colors --- */ --color-button-primary: #5A9BD4; /* Updated to a brighter blue */ --color-button-primary-hover: #7BB0E0; --color-button-remove: #d2691e; --color-button-remove-hover: #e57300; --color-button-restore: #66bb6a; --color-button-restore-hover: #81c784; /* --- Move Here Button Colors --- */ --color-moveHere-bg: #4f4f4f; --color-moveHere-hover-bg: #5f5f5f; /* --- Border Colors --- */ --color-border-header: #444444; --color-border-tab: #595959; --color-border-search: #777777; /* --- Other Colors --- */ --color-shadow: rgba(0, 0, 0, 0.5); } - User
How can I switch between dark and light theme?
- Assistant
- User
It doesn't work. Is it possible to fix it?
- Assistant