feat(shadertoy): show fullscreen button only on widget hover, add min-height (#281)

This commit is contained in:
Olivier Chafik 2026-01-15 14:15:17 +00:00 • committed by GitHub
commit 0936d52d0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,6 +2,7 @@ html, body {
margin: 0; margin: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
min-height: 400px;
overflow: hidden; overflow: hidden;
} }
@ -9,6 +10,7 @@ html, body {
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
min-height: 400px;
} }
#canvas { #canvas {
@ -33,7 +35,7 @@ html, body {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
transition: background 0.2s, opacity 0.2s; transition: background 0.2s, opacity 0.2s;
opacity: 0.7; opacity: 0; /* Initially invisible, shown on widget hover */
z-index: 100; z-index: 100;
} }
@ -55,6 +57,11 @@ html, body {
display: flex; display: flex;
} }
/* Show button on widget hover */
.main:hover .fullscreen-btn.available {
opacity: 0.7;
}
/* Fullscreen mode */ /* Fullscreen mode */
.main.fullscreen .fullscreen-btn .expand-icon { .main.fullscreen .fullscreen-btn .expand-icon {
display: none; display: none;