diff --git a/src/components/COGURL.astro b/src/components/COGURL.astro index b4f7951..5102e38 100644 --- a/src/components/COGURL.astro +++ b/src/components/COGURL.astro @@ -37,4 +37,9 @@ function viewCOG() { pointer-events: auto; } } - +@media (max-width: 40rem) { + .cogurl { + display: none; + } +} + \ No newline at end of file diff --git a/src/components/ChoosePalette.astro b/src/components/ChoosePalette.astro index 14749ab..3d18402 100644 --- a/src/components/ChoosePalette.astro +++ b/src/components/ChoosePalette.astro @@ -82,12 +82,12 @@ document.addEventListener('DOMContentLoaded', () => { \ No newline at end of file diff --git a/src/components/Logos.astro b/src/components/Logos.astro index 822e8eb..b546589 100644 --- a/src/components/Logos.astro +++ b/src/components/Logos.astro @@ -45,5 +45,12 @@ fill: red; } } -} +} +@media (max-width: 40rem) { + #nilulogo { + left: auto; + right: 0.5rem; + top: 0.5rem; + } +} \ No newline at end of file diff --git a/src/components/LowerRightCornerUI.astro b/src/components/LowerRightCornerUI.astro index 498d216..9f4bd10 100644 --- a/src/components/LowerRightCornerUI.astro +++ b/src/components/LowerRightCornerUI.astro @@ -21,5 +21,14 @@ import ChoosePalette from './ChoosePalette.astro'; gap: 0.5rem; bottom: 1rem; right: 1rem; + max-width: 100vw; + overflow: auto; +} +@media (max-width: 40rem) { + .lower-right-corner-ui { + width: 100vw; + right: 0; + bottom: 0.5rem; + } } \ No newline at end of file diff --git a/src/components/Toaster.astro b/src/components/Toaster.astro index 581287a..3852025 100644 --- a/src/components/Toaster.astro +++ b/src/components/Toaster.astro @@ -34,7 +34,7 @@ window.newToast = ( message) => { position: fixed; right: 1rem; top: 1rem; - max-width: 40rem; + max-width: min(40rem, 100vw); display: flex; flex-direction: column; gap: 0.5rem; @@ -58,5 +58,15 @@ window.newToast = ( message) => { } } } +@media (max-width: 40rem) { + #toaster { + right: 0; + top: 1rem; + width: 100vw; + .toast { + background-color: #eee; + border-radius: 2px; + } +} \ No newline at end of file diff --git a/src/style.css b/src/style.css index 1d8526d..81d9de4 100644 --- a/src/style.css +++ b/src/style.css @@ -12,12 +12,19 @@ html { font-family: 'Inter', 'System-ui', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif; } - + +@keyframes shift-right { + 0% { transform: translateX(0); } + 50% { transform: translateX(1rem); } + 100% { transform: translateX(0); } +} + .stactreeview { /*background-color: color-mix(in srgb, var(--nilu-light-blue), 30% transparent);*/ background-color: transparent; transition: background-color 0.1s; summary { + .staclogo { width: 50px; height: 50px; @@ -29,21 +36,22 @@ html { background-position: center; vertical-align: middle; mix-blend-mode: multiply; /* Set white as transparent */ - transform: rotate(0deg); + position: relative; transition: transform 0.4s ease-in-out; + transform: translateX(0); &:hover { - transform: rotate(360deg); - + /* Play an animaton to shift it right 2rem then back again */ + animation: shift-right 0.4s ease-in-out; } } } &[open] { background-color: #efefef; - max-height: 100vh; + max-height: 100dvh; height:100dvh; } - max-height: 80vh; - width: 20vw; + max-height: 80dvh; + width: max(20vw, 14rem); padding: 1rem; overflow: auto; position: absolute;