Spaces:
Sleeping
Sleeping
fix(ui): prevent minimap overlap with right sidebar
Browse files- Restore missing canvas-container base styles
- Adjust minimap positioning to stay within game bounds
- Add max-width/max-height constraints
- Improve hover effect with proper transform-origin
- Add responsive minimap adjustments for smaller screens
- static/styles.css +39 -0
static/styles.css
CHANGED
|
@@ -1192,6 +1192,23 @@ body {
|
|
| 1192 |
50% { opacity: 0.8; }
|
| 1193 |
}
|
| 1194 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1195 |
/* Modern Minimap - Base Styles */
|
| 1196 |
#minimap-container {
|
| 1197 |
position: absolute;
|
|
@@ -1207,11 +1224,16 @@ body {
|
|
| 1207 |
backdrop-filter: blur(10px);
|
| 1208 |
transition: all var(--transition-fast);
|
| 1209 |
z-index: var(--z-fixed);
|
|
|
|
|
|
|
|
|
|
| 1210 |
}
|
| 1211 |
|
| 1212 |
#minimap-container:hover {
|
| 1213 |
transform: scale(1.05);
|
| 1214 |
box-shadow: var(--shadow-glow);
|
|
|
|
|
|
|
| 1215 |
}
|
| 1216 |
|
| 1217 |
#minimap {
|
|
@@ -1229,6 +1251,23 @@ body {
|
|
| 1229 |
border-radius: var(--radius-sm);
|
| 1230 |
}
|
| 1231 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1232 |
/* Modern Camera Controls */
|
| 1233 |
#camera-controls {
|
| 1234 |
position: absolute;
|
|
|
|
| 1192 |
50% { opacity: 0.8; }
|
| 1193 |
}
|
| 1194 |
|
| 1195 |
+
/* Modern Canvas Container */
|
| 1196 |
+
#canvas-container {
|
| 1197 |
+
flex: 1;
|
| 1198 |
+
position: relative;
|
| 1199 |
+
background: var(--bg-primary);
|
| 1200 |
+
overflow: hidden;
|
| 1201 |
+
}
|
| 1202 |
+
|
| 1203 |
+
#game-canvas {
|
| 1204 |
+
width: 100%;
|
| 1205 |
+
height: 100%;
|
| 1206 |
+
display: block;
|
| 1207 |
+
cursor: crosshair;
|
| 1208 |
+
image-rendering: crisp-edges;
|
| 1209 |
+
image-rendering: pixelated;
|
| 1210 |
+
}
|
| 1211 |
+
|
| 1212 |
/* Modern Minimap - Base Styles */
|
| 1213 |
#minimap-container {
|
| 1214 |
position: absolute;
|
|
|
|
| 1224 |
backdrop-filter: blur(10px);
|
| 1225 |
transition: all var(--transition-fast);
|
| 1226 |
z-index: var(--z-fixed);
|
| 1227 |
+
/* Ensure it doesn't overlap with right sidebar */
|
| 1228 |
+
max-width: calc(100% - (var(--space-lg) * 2));
|
| 1229 |
+
max-height: calc(100% - (var(--space-lg) * 2));
|
| 1230 |
}
|
| 1231 |
|
| 1232 |
#minimap-container:hover {
|
| 1233 |
transform: scale(1.05);
|
| 1234 |
box-shadow: var(--shadow-glow);
|
| 1235 |
+
/* Prevent overflow on hover */
|
| 1236 |
+
transform-origin: bottom right;
|
| 1237 |
}
|
| 1238 |
|
| 1239 |
#minimap {
|
|
|
|
| 1251 |
border-radius: var(--radius-sm);
|
| 1252 |
}
|
| 1253 |
|
| 1254 |
+
/* Additional responsive minimap adjustments */
|
| 1255 |
+
@media (max-width: 1400px) {
|
| 1256 |
+
#minimap-container {
|
| 1257 |
+
right: var(--space-md);
|
| 1258 |
+
bottom: var(--space-md);
|
| 1259 |
+
width: 200px;
|
| 1260 |
+
height: 150px;
|
| 1261 |
+
}
|
| 1262 |
+
}
|
| 1263 |
+
|
| 1264 |
+
@media (max-width: 1200px) {
|
| 1265 |
+
#minimap-container {
|
| 1266 |
+
width: 180px;
|
| 1267 |
+
height: 135px;
|
| 1268 |
+
}
|
| 1269 |
+
}
|
| 1270 |
+
|
| 1271 |
/* Modern Camera Controls */
|
| 1272 |
#camera-controls {
|
| 1273 |
position: absolute;
|