diff --git a/color.css b/color.css index 4454ce1..ac7c770 100644 --- a/color.css +++ b/color.css @@ -534,4 +534,83 @@ input:checked + .slider:before { #copy-link-button:hover { background-color: #45a049; +} + +/* --- Zoom Overlay Feature --- */ + +#zoom-overlay { + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + background-color: rgba(0, 0, 0, 0.75); /* Dark, semi-transparent background */ + z-index: 1001; /* Ensure it's on top of everything */ + + /* Use flexbox to center the content */ + display: flex; + justify-content: center; + align-items: center; + + /* Start hidden and transition opacity */ + opacity: 0; + visibility: hidden; + transition: opacity 0.3s ease, visibility 0.3s ease; + + cursor: zoom-out; /* Hint to the user how to close it */ +} + +/* The class we'll toggle with JavaScript to show the overlay */ +#zoom-overlay.is-active { + opacity: 1; + visibility: visible; +} + +/* The container for the zoomed-in palette balloons */ +#zoomed-palette-content { + width: 90vw; + height: 80vh; + padding: 20px; + + /* Looks like the original palette */ + background-color: #e8e8e8; + background-image: url("https://www.transparenttextures.com/patterns/asfalt-light.png"); + border-radius: 15px; + + /* Allow scrolling if there are many balloons */ + overflow-y: auto; + + /* Arrange the cloned balloons */ + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: center; + gap: 20px; + + cursor: default; /* Use a normal cursor for the content itself */ +} + +/* Make the balloons and their names larger in the zoom view */ +#zoomed-palette-content .swatch-wrapper { + transform: scale(1.1); +} + +/* --- Definitive Rules for Larger Selected Balloons --- */ +/* Using !important to forcefully override any other conflicting styles. */ + +/* This rule ensures the wrapper can expand to fit the larger balloon */ +#selected-palette .swatch-wrapper { + width: auto !important; + max-width: none !important; +} + +/* This rule sets the new, larger size for the balloon swatch */ +#selected-palette .color-swatch { + width: 130px !important; + height: 177px !important; +} + +/* This rule re-aligns the balloon string to match the new height */ +#selected-palette .balloon-string-svg { + top: 108px !important; } \ No newline at end of file diff --git a/index.html b/index.html index 571cd04..5f790b9 100644 --- a/index.html +++ b/index.html @@ -1,102 +1,92 @@ -