Skip to content

Commit 6a60cf5

Browse files
committed
fix 28
1 parent fbef5fe commit 6a60cf5

File tree

2 files changed

+21
-14
lines changed

2 files changed

+21
-14
lines changed

css/styles.css

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ main {
5454
flex-direction: column;
5555
height: 100%;
5656
position: relative;
57-
padding-bottom: 40px; /* Reduced space for status message */
57+
padding-bottom: 30px; /* Reduced space for status message */
5858
}
5959

6060
.screen-content {
@@ -164,7 +164,7 @@ main {
164164
align-items: center;
165165
text-align: center;
166166
padding-top: 5px;
167-
padding-bottom: 80px; /* Increased space for email button */
167+
padding-bottom: 60px; /* Reduced space for email button */
168168
}
169169

170170
.celebration-header {
@@ -180,12 +180,14 @@ main {
180180
}
181181

182182
.palette-display {
183-
margin-bottom: 15px;
184-
min-height: 80px; /* Reduced height */
183+
margin-bottom: 10px; /* Reduced margin */
184+
min-height: 60px; /* Reduced height */
185185
display: flex;
186186
justify-content: center;
187187
align-items: center;
188188
width: 100%;
189+
max-height: 120px; /* Limit max height */
190+
overflow: hidden; /* Prevent overflow */
189191
}
190192

191193
.palette-container {
@@ -222,7 +224,7 @@ main {
222224
gap: 8px;
223225
width: 100%;
224226
position: absolute;
225-
bottom: 45px; /* Moved up to avoid overlapping with status message */
227+
bottom: 35px; /* Moved up to ensure visibility */
226228
}
227229

228230
.action-button.email {

js/mood-palette.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -385,11 +385,13 @@ function displayPalette(colors) {
385385
const paletteContainer = document.createElement('div');
386386
paletteContainer.className = 'palette-container';
387387
paletteContainer.style.display = 'flex';
388-
paletteContainer.style.gap = '10px';
388+
paletteContainer.style.gap = '8px'; // Reduced gap
389389
paletteContainer.style.justifyContent = 'center';
390390
paletteContainer.style.flexWrap = 'wrap';
391391
paletteContainer.style.alignItems = 'center';
392-
paletteContainer.style.marginTop = '10px';
392+
paletteContainer.style.marginTop = '5px'; // Reduced margin
393+
paletteContainer.style.maxHeight = '100px'; // Limit height
394+
paletteContainer.style.overflow = 'hidden'; // Prevent overflow
393395

394396
colors.forEach((color, index) => {
395397
// Validate that color is a valid hex code
@@ -398,26 +400,29 @@ function displayPalette(colors) {
398400
swatchContainer.style.display = 'flex';
399401
swatchContainer.style.flexDirection = 'column';
400402
swatchContainer.style.alignItems = 'center';
401-
swatchContainer.style.margin = '5px';
403+
swatchContainer.style.margin = '3px'; // Reduced margin
402404

403-
// Create a rectangle shape for the color
405+
// Create a rectangle shape for the color (smaller size)
404406
const colorSwatch = document.createElement('div');
405407
colorSwatch.style.backgroundColor = color;
406-
colorSwatch.style.width = '40px';
407-
colorSwatch.style.height = '40px';
408+
colorSwatch.style.width = '30px'; // Smaller width
409+
colorSwatch.style.height = '30px'; // Smaller height
408410
colorSwatch.style.border = '2px solid #fff';
409411
colorSwatch.style.borderRadius = '4px';
410412
colorSwatch.style.boxSizing = 'border-box';
411413
colorSwatch.title = color;
412414

413-
// Add a label with the hex code
415+
// Add a label with the hex code (smaller font)
414416
const colorLabel = document.createElement('div');
415417
colorLabel.textContent = color;
416418
colorLabel.style.color = '#fff';
417-
colorLabel.style.fontSize = '10px';
418-
colorLabel.style.marginTop = '4px';
419+
colorLabel.style.fontSize = '8px'; // Smaller font
420+
colorLabel.style.marginTop = '2px'; // Reduced margin
419421
colorLabel.style.fontFamily = 'Courier New, monospace';
420422
colorLabel.style.textAlign = 'center';
423+
colorLabel.style.maxWidth = '30px';
424+
colorLabel.style.overflow = 'hidden';
425+
colorLabel.style.textOverflow = 'ellipsis';
421426

422427
swatchContainer.appendChild(colorSwatch);
423428
swatchContainer.appendChild(colorLabel);

0 commit comments

Comments
 (0)