Tighten palette control

This commit is contained in:
Codex
2026-03-07 08:54:52 +00:00
parent f4770f62f4
commit c10f85c852
2 changed files with 25 additions and 23 deletions

View File

@@ -114,18 +114,18 @@ a:hover {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 0.35rem 0.7rem; width: 36px;
border-radius: 999px; height: 36px;
border-radius: 50%;
border: 1px solid var(--border); border: 1px solid var(--border);
background: var(--input-bg); background: var(--input-bg);
color: var(--text); color: var(--text);
font-weight: 600; font-weight: 600;
font-size: 0.85rem; font-size: 1rem;
font-family: inherit; font-family: inherit;
line-height: 1; line-height: 1;
cursor: pointer; cursor: pointer;
transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s; transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
min-width: 42px;
} }
.theme-toggle:hover { .theme-toggle:hover {
border-color: var(--accent); border-color: var(--accent);
@@ -137,34 +137,36 @@ a:hover {
.floating-palette-controls { .floating-palette-controls {
position: fixed; position: fixed;
bottom: clamp(1rem, 2vw, 1.5rem); bottom: clamp(0.75rem, 2vw, 1.25rem);
right: clamp(1rem, 2vw, 1.5rem); right: clamp(0.75rem, 2vw, 1.25rem);
display: flex; display: flex;
align-items: center; align-items: center;
gap: 0.4rem; gap: 0.3rem;
padding: 0.35rem 0.65rem; padding: 0.2rem 0.45rem;
border-radius: 999px; border-radius: 999px;
background: var(--bg-elevated); background: var(--bg-elevated);
border: 1px solid var(--border); border: 1px solid rgba(255, 255, 255, 0.08);
box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
backdrop-filter: blur(18px); backdrop-filter: blur(24px);
-webkit-backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(24px);
z-index: 200; z-index: 200;
} }
.palette-dots { .palette-dots {
display: flex; display: flex;
gap: 0.35rem; gap: 0.25rem;
} }
.palette-dot { .palette-dot {
width: 34px; width: 30px;
height: 34px; height: 30px;
border-radius: 50%; border-radius: 50%;
border: 2px solid transparent; border: 1px solid transparent;
padding: 0; padding: 0;
background-size: cover; background-size: 160%;
background-position: center; background-position: center;
cursor: pointer; cursor: pointer;
transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
overflow: hidden;
} }
.palette-dot:hover { .palette-dot:hover {
transform: translateY(-1px); transform: translateY(-1px);
@@ -180,13 +182,13 @@ a:hover {
@media (max-width: 520px) { @media (max-width: 520px) {
.floating-palette-controls { .floating-palette-controls {
gap: 0.25rem; gap: 0.2rem;
padding: 0.25rem 0.55rem; padding: 0.18rem 0.35rem;
right: 0.75rem; right: 0.65rem;
} }
.palette-dot { .palette-dot {
width: 30px; width: 26px;
height: 30px; height: 26px;
} }
} }

View File

@@ -374,7 +374,7 @@
class:active={index === selectedPaletteIndex} class:active={index === selectedPaletteIndex}
aria-pressed={index === selectedPaletteIndex} aria-pressed={index === selectedPaletteIndex}
aria-label={`Switch to ${palette.label} palette`} aria-label={`Switch to ${palette.label} palette`}
style={`background: ${palette[theme]['accent-gradient']};`} style={`background-image: ${palette[theme]['accent-gradient']};`}
on:click={() => setPalette(index)} on:click={() => setPalette(index)}
></button> ></button>
{/each} {/each}