Spaces:
Running
Running
Update style.css
Browse files
style.css
CHANGED
|
@@ -1,51 +1,33 @@
|
|
| 1 |
-
/*
|
| 2 |
|
| 3 |
-
/* Widget container
|
| 4 |
.ply-widget-container {
|
| 5 |
position: relative;
|
| 6 |
width: 100%;
|
| 7 |
height: 0; /* Important: Height 0 allows padding-bottom to control size */
|
| 8 |
/* padding-bottom is set dynamically inline for aspect ratio */
|
| 9 |
background-color: black;
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
/*
|
| 13 |
-
contain: layout style; /* Help browser understand this container's layout is important */
|
| 14 |
-
/* Enable hardware acceleration for smoother transitions */
|
| 15 |
-
transform: translateZ(0);
|
| 16 |
-
will-change: height, padding-bottom;
|
| 17 |
-
transition: height 0.2s ease, padding-bottom 0.2s ease,
|
| 18 |
-
width 0.2s ease, position 0.2s ease;
|
| 19 |
-
}
|
| 20 |
-
|
| 21 |
-
/* Animation to force redraw */
|
| 22 |
-
.force-reflow {
|
| 23 |
-
animation: force-redraw 0.01s;
|
| 24 |
-
}
|
| 25 |
-
|
| 26 |
-
@keyframes force-redraw {
|
| 27 |
-
0% { opacity: 0.99; }
|
| 28 |
-
100% { opacity: 1; }
|
| 29 |
}
|
| 30 |
|
| 31 |
-
/*
|
| 32 |
.ply-widget-container.fake-fullscreen {
|
| 33 |
position: fixed !important;
|
| 34 |
top: 0 !important;
|
| 35 |
left: 0 !important;
|
| 36 |
width: 100vw !important;
|
| 37 |
height: 100vh !important;
|
| 38 |
-
padding-bottom: 0 !important;
|
| 39 |
z-index: 9999 !important;
|
| 40 |
background-color: black;
|
| 41 |
border-radius: 0 !important;
|
| 42 |
margin: 0 !important;
|
| 43 |
max-width: 100vw !important;
|
| 44 |
max-height: 100vh !important;
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
will-change: transform;
|
| 48 |
-
transition: all 0.2s ease;
|
| 49 |
}
|
| 50 |
|
| 51 |
/* For native fullscreen - ensure no aspect ratio padding */
|
|
@@ -55,19 +37,15 @@
|
|
| 55 |
padding-bottom: 0 !important;
|
| 56 |
border-radius: 0 !important;
|
| 57 |
background-color: black;
|
| 58 |
-
will-change: transform;
|
| 59 |
-
transform: translateZ(0);
|
| 60 |
}
|
| 61 |
|
| 62 |
-
/* Vendor prefixes for fullscreen
|
| 63 |
.ply-widget-container:-webkit-full-screen {
|
| 64 |
width: 100vw !important;
|
| 65 |
height: 100vh !important;
|
| 66 |
padding-bottom: 0 !important;
|
| 67 |
border-radius: 0 !important;
|
| 68 |
background-color: black;
|
| 69 |
-
will-change: transform;
|
| 70 |
-
transform: translateZ(0);
|
| 71 |
}
|
| 72 |
|
| 73 |
.ply-widget-container:-moz-full-screen {
|
|
@@ -76,8 +54,6 @@
|
|
| 76 |
padding-bottom: 0 !important;
|
| 77 |
border-radius: 0 !important;
|
| 78 |
background-color: black;
|
| 79 |
-
will-change: transform;
|
| 80 |
-
transform: translateZ(0);
|
| 81 |
}
|
| 82 |
|
| 83 |
.ply-widget-container:-ms-fullscreen {
|
|
@@ -86,11 +62,9 @@
|
|
| 86 |
padding-bottom: 0 !important;
|
| 87 |
border-radius: 0 !important;
|
| 88 |
background-color: black;
|
| 89 |
-
will-change: transform;
|
| 90 |
-
transform: translateZ(0);
|
| 91 |
}
|
| 92 |
|
| 93 |
-
/*
|
| 94 |
.viewer-container {
|
| 95 |
display: none;
|
| 96 |
position: absolute;
|
|
@@ -105,15 +79,13 @@
|
|
| 105 |
border-radius: 10px;
|
| 106 |
overflow: hidden;
|
| 107 |
box-sizing: border-box;
|
|
|
|
|
|
|
| 108 |
min-height: 100%;
|
| 109 |
object-fit: contain;
|
| 110 |
-
/* Enable hardware acceleration */
|
| 111 |
-
transform: translateZ(0);
|
| 112 |
-
will-change: transform;
|
| 113 |
-
transition: all 0.2s ease;
|
| 114 |
}
|
| 115 |
|
| 116 |
-
/* When parent container is fullscreen, adjust viewer container
|
| 117 |
.fake-fullscreen .viewer-container,
|
| 118 |
:fullscreen .viewer-container,
|
| 119 |
:-webkit-full-screen .viewer-container,
|
|
@@ -123,10 +95,9 @@
|
|
| 123 |
border: none;
|
| 124 |
width: 100%;
|
| 125 |
height: 100%;
|
| 126 |
-
transform: translateZ(0);
|
| 127 |
}
|
| 128 |
|
| 129 |
-
/* GIF Preview styling
|
| 130 |
.gif-preview-container {
|
| 131 |
position: absolute;
|
| 132 |
top: 0;
|
|
@@ -138,8 +109,6 @@
|
|
| 138 |
overflow: hidden;
|
| 139 |
cursor: pointer;
|
| 140 |
background-color: black;
|
| 141 |
-
/* Enable hardware acceleration */
|
| 142 |
-
transform: translateZ(0);
|
| 143 |
}
|
| 144 |
|
| 145 |
.gif-preview-container img {
|
|
@@ -148,24 +117,21 @@
|
|
| 148 |
object-fit: cover;
|
| 149 |
}
|
| 150 |
|
| 151 |
-
/*
|
| 152 |
.ply-canvas {
|
| 153 |
width: 100%;
|
| 154 |
height: 100%;
|
| 155 |
display: block;
|
| 156 |
-
background-color: transparent;
|
| 157 |
-
z-index: 1;
|
| 158 |
-
position: absolute;
|
| 159 |
top: 0;
|
| 160 |
left: 0;
|
| 161 |
right: 0;
|
| 162 |
bottom: 0;
|
| 163 |
-
/* Enable hardware acceleration */
|
| 164 |
-
transform: translateZ(0);
|
| 165 |
-
will-change: transform;
|
| 166 |
}
|
| 167 |
|
| 168 |
-
/* Make sure canvas fills the entire space in fullscreen
|
| 169 |
.fake-fullscreen .ply-canvas,
|
| 170 |
:fullscreen .ply-canvas,
|
| 171 |
:-webkit-full-screen .ply-canvas,
|
|
@@ -173,7 +139,6 @@
|
|
| 173 |
:-ms-fullscreen .ply-canvas {
|
| 174 |
width: 100vw;
|
| 175 |
height: 100vh;
|
| 176 |
-
transform: translateZ(0);
|
| 177 |
}
|
| 178 |
|
| 179 |
/* Progress dialog styling (centered) */
|
|
@@ -232,7 +197,7 @@ progress::-moz-progress-bar {
|
|
| 232 |
z-index: 1010; /* Higher than buttons to appear on top when shown */
|
| 233 |
}
|
| 234 |
|
| 235 |
-
/*
|
| 236 |
.widget-button {
|
| 237 |
position: absolute;
|
| 238 |
width: 45px;
|
|
@@ -243,21 +208,17 @@ progress::-moz-progress-bar {
|
|
| 243 |
cursor: pointer;
|
| 244 |
font-size: 14px;
|
| 245 |
color: white;
|
| 246 |
-
display: flex !important;
|
| 247 |
align-items: center;
|
| 248 |
justify-content: center;
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
/*
|
| 253 |
-
transform: translateZ(0);
|
| 254 |
-
will-change: transform, opacity;
|
| 255 |
-
transition: background-color 0.15s ease, transform 0.15s ease;
|
| 256 |
}
|
| 257 |
|
| 258 |
.widget-button:hover {
|
| 259 |
background-color: rgba(70, 130, 180, 0.5);
|
| 260 |
-
transform: translateZ(0) scale(1.05);
|
| 261 |
}
|
| 262 |
|
| 263 |
/* Make sure buttons remain visible in fullscreen modes */
|
|
@@ -267,7 +228,6 @@ progress::-moz-progress-bar {
|
|
| 267 |
:-moz-full-screen .widget-button,
|
| 268 |
:-ms-fullscreen .widget-button {
|
| 269 |
z-index: 10000; /* Extra high z-index in fullscreen mode */
|
| 270 |
-
transform: translateZ(0);
|
| 271 |
}
|
| 272 |
|
| 273 |
/* Specific button positions */
|
|
@@ -347,7 +307,7 @@ html, body {
|
|
| 347 |
height: 100%;
|
| 348 |
}
|
| 349 |
|
| 350 |
-
/* Additional fullscreen styles for mobile browsers
|
| 351 |
@media screen and (max-width: 768px) {
|
| 352 |
.ply-widget-container.fake-fullscreen {
|
| 353 |
position: fixed !important;
|
|
@@ -359,7 +319,6 @@ html, body {
|
|
| 359 |
bottom: 0 !important;
|
| 360 |
z-index: 9999 !important;
|
| 361 |
padding-bottom: 0 !important; /* Make sure padding is removed on mobile too */
|
| 362 |
-
transform: translateZ(0);
|
| 363 |
}
|
| 364 |
|
| 365 |
/* Ensure buttons remain visible on mobile */
|
|
@@ -368,7 +327,6 @@ html, body {
|
|
| 368 |
visibility: visible !important;
|
| 369 |
opacity: 1 !important;
|
| 370 |
z-index: 10000 !important;
|
| 371 |
-
transform: translateZ(0);
|
| 372 |
}
|
| 373 |
}
|
| 374 |
|
|
|
|
| 1 |
+
/* viewer.css - Modified to properly restore aspect ratio when exiting fullscreen */
|
| 2 |
|
| 3 |
+
/* Widget container styling */
|
| 4 |
.ply-widget-container {
|
| 5 |
position: relative;
|
| 6 |
width: 100%;
|
| 7 |
height: 0; /* Important: Height 0 allows padding-bottom to control size */
|
| 8 |
/* padding-bottom is set dynamically inline for aspect ratio */
|
| 9 |
background-color: black;
|
| 10 |
+
transition: all 0.3s ease; /* Smooth transition when toggling fullscreen */
|
| 11 |
+
box-sizing: border-box; /* Ensure padding is included in the height calculation */
|
| 12 |
+
overflow: hidden; /* Prevents content overflow */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
}
|
| 14 |
|
| 15 |
+
/* When in fake fullscreen mode (iOS fallback) */
|
| 16 |
.ply-widget-container.fake-fullscreen {
|
| 17 |
position: fixed !important;
|
| 18 |
top: 0 !important;
|
| 19 |
left: 0 !important;
|
| 20 |
width: 100vw !important;
|
| 21 |
height: 100vh !important;
|
| 22 |
+
padding-bottom: 0 !important; /* Remove aspect ratio padding in fullscreen */
|
| 23 |
z-index: 9999 !important;
|
| 24 |
background-color: black;
|
| 25 |
border-radius: 0 !important;
|
| 26 |
margin: 0 !important;
|
| 27 |
max-width: 100vw !important;
|
| 28 |
max-height: 100vh !important;
|
| 29 |
+
box-sizing: border-box;
|
| 30 |
+
overflow: hidden;
|
|
|
|
|
|
|
| 31 |
}
|
| 32 |
|
| 33 |
/* For native fullscreen - ensure no aspect ratio padding */
|
|
|
|
| 37 |
padding-bottom: 0 !important;
|
| 38 |
border-radius: 0 !important;
|
| 39 |
background-color: black;
|
|
|
|
|
|
|
| 40 |
}
|
| 41 |
|
| 42 |
+
/* Vendor prefixes for fullscreen */
|
| 43 |
.ply-widget-container:-webkit-full-screen {
|
| 44 |
width: 100vw !important;
|
| 45 |
height: 100vh !important;
|
| 46 |
padding-bottom: 0 !important;
|
| 47 |
border-radius: 0 !important;
|
| 48 |
background-color: black;
|
|
|
|
|
|
|
| 49 |
}
|
| 50 |
|
| 51 |
.ply-widget-container:-moz-full-screen {
|
|
|
|
| 54 |
padding-bottom: 0 !important;
|
| 55 |
border-radius: 0 !important;
|
| 56 |
background-color: black;
|
|
|
|
|
|
|
| 57 |
}
|
| 58 |
|
| 59 |
.ply-widget-container:-ms-fullscreen {
|
|
|
|
| 62 |
padding-bottom: 0 !important;
|
| 63 |
border-radius: 0 !important;
|
| 64 |
background-color: black;
|
|
|
|
|
|
|
| 65 |
}
|
| 66 |
|
| 67 |
+
/* Viewer Container styling */
|
| 68 |
.viewer-container {
|
| 69 |
display: none;
|
| 70 |
position: absolute;
|
|
|
|
| 79 |
border-radius: 10px;
|
| 80 |
overflow: hidden;
|
| 81 |
box-sizing: border-box;
|
| 82 |
+
transition: all 0.3s ease;
|
| 83 |
+
/* These ensure proper rendering after fullscreen exit */
|
| 84 |
min-height: 100%;
|
| 85 |
object-fit: contain;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
}
|
| 87 |
|
| 88 |
+
/* When parent container is fullscreen, adjust viewer container */
|
| 89 |
.fake-fullscreen .viewer-container,
|
| 90 |
:fullscreen .viewer-container,
|
| 91 |
:-webkit-full-screen .viewer-container,
|
|
|
|
| 95 |
border: none;
|
| 96 |
width: 100%;
|
| 97 |
height: 100%;
|
|
|
|
| 98 |
}
|
| 99 |
|
| 100 |
+
/* GIF Preview styling */
|
| 101 |
.gif-preview-container {
|
| 102 |
position: absolute;
|
| 103 |
top: 0;
|
|
|
|
| 109 |
overflow: hidden;
|
| 110 |
cursor: pointer;
|
| 111 |
background-color: black;
|
|
|
|
|
|
|
| 112 |
}
|
| 113 |
|
| 114 |
.gif-preview-container img {
|
|
|
|
| 117 |
object-fit: cover;
|
| 118 |
}
|
| 119 |
|
| 120 |
+
/* Canvas fills the viewer container */
|
| 121 |
.ply-canvas {
|
| 122 |
width: 100%;
|
| 123 |
height: 100%;
|
| 124 |
display: block;
|
| 125 |
+
background-color: transparent; /* Transparent background for PlayCanvas rendering */
|
| 126 |
+
z-index: 1; /* Lower z-index to keep it behind buttons */
|
| 127 |
+
position: absolute; /* Ensure canvas fills the entire container */
|
| 128 |
top: 0;
|
| 129 |
left: 0;
|
| 130 |
right: 0;
|
| 131 |
bottom: 0;
|
|
|
|
|
|
|
|
|
|
| 132 |
}
|
| 133 |
|
| 134 |
+
/* Make sure canvas fills the entire space in fullscreen */
|
| 135 |
.fake-fullscreen .ply-canvas,
|
| 136 |
:fullscreen .ply-canvas,
|
| 137 |
:-webkit-full-screen .ply-canvas,
|
|
|
|
| 139 |
:-ms-fullscreen .ply-canvas {
|
| 140 |
width: 100vw;
|
| 141 |
height: 100vh;
|
|
|
|
| 142 |
}
|
| 143 |
|
| 144 |
/* Progress dialog styling (centered) */
|
|
|
|
| 197 |
z-index: 1010; /* Higher than buttons to appear on top when shown */
|
| 198 |
}
|
| 199 |
|
| 200 |
+
/* Button styling with improved visibility */
|
| 201 |
.widget-button {
|
| 202 |
position: absolute;
|
| 203 |
width: 45px;
|
|
|
|
| 208 |
cursor: pointer;
|
| 209 |
font-size: 14px;
|
| 210 |
color: white;
|
| 211 |
+
display: flex !important; /* Always display flex */
|
| 212 |
align-items: center;
|
| 213 |
justify-content: center;
|
| 214 |
+
transition: background-color 0.2s ease;
|
| 215 |
+
z-index: 1000; /* Higher z-index to ensure visibility */
|
| 216 |
+
opacity: 1 !important; /* Force opacity to ensure visibility */
|
| 217 |
+
visibility: visible !important; /* Force visibility */
|
|
|
|
|
|
|
|
|
|
| 218 |
}
|
| 219 |
|
| 220 |
.widget-button:hover {
|
| 221 |
background-color: rgba(70, 130, 180, 0.5);
|
|
|
|
| 222 |
}
|
| 223 |
|
| 224 |
/* Make sure buttons remain visible in fullscreen modes */
|
|
|
|
| 228 |
:-moz-full-screen .widget-button,
|
| 229 |
:-ms-fullscreen .widget-button {
|
| 230 |
z-index: 10000; /* Extra high z-index in fullscreen mode */
|
|
|
|
| 231 |
}
|
| 232 |
|
| 233 |
/* Specific button positions */
|
|
|
|
| 307 |
height: 100%;
|
| 308 |
}
|
| 309 |
|
| 310 |
+
/* Additional fullscreen styles for mobile browsers */
|
| 311 |
@media screen and (max-width: 768px) {
|
| 312 |
.ply-widget-container.fake-fullscreen {
|
| 313 |
position: fixed !important;
|
|
|
|
| 319 |
bottom: 0 !important;
|
| 320 |
z-index: 9999 !important;
|
| 321 |
padding-bottom: 0 !important; /* Make sure padding is removed on mobile too */
|
|
|
|
| 322 |
}
|
| 323 |
|
| 324 |
/* Ensure buttons remain visible on mobile */
|
|
|
|
| 327 |
visibility: visible !important;
|
| 328 |
opacity: 1 !important;
|
| 329 |
z-index: 10000 !important;
|
|
|
|
| 330 |
}
|
| 331 |
}
|
| 332 |
|