User:Monster Domosed/common.css: Difference between revisionsGive feedback
Jump to navigation
Jump to search
testing |
No edit summary |
||
| Line 1: | Line 1: | ||
/* ===== | /* ===== Rotatable Model Viewer ===== */ | ||
.rotatable-model-wrapper { | .rotatable-model-wrapper { | ||
| Line 16: | Line 14: | ||
border: 1px solid #a2a9b1; | border: 1px solid #a2a9b1; | ||
background: #f8f9fa; | background: #f8f9fa; | ||
user-select: none; | |||
-webkit-user-select: none; | -webkit-user-select: none; | ||
touch-action: none; | |||
touch-action: none; | |||
} | } | ||
.rotatable-model.rm-dragging { | .rotatable-model.rm-dragging { | ||
cursor: grabbing; | cursor: grabbing; | ||
} | } | ||
/* | /* ---- 3D sprite strip ---- */ | ||
.rotatable-model img.rm-strip { | .rotatable-model img.rm-strip { | ||
position: absolute; | position: absolute; | ||
top: 0; | top: 0; | ||
left: 0; | left: 0; | ||
max-width: none | height: 100%; | ||
max-width: none !important; | |||
max-height: none !important; | max-height: none !important; | ||
pointer-events: none; | pointer-events: none; | ||
| Line 38: | Line 35: | ||
} | } | ||
/* | /* ---- 2D static image ---- */ | ||
.rotatable-model img.rm-static { | |||
position: absolute; | |||
top: 0; | |||
left: 0; | |||
width: 100%; | |||
height: 100%; | |||
object-fit: contain; | |||
pointer-events: none; | |||
user-select: none; | |||
display: none; /* hidden by default (3D mode) */ | |||
} | |||
/* ---- 2D mode state ---- */ | |||
.rotatable-model.rm-is-2d { | |||
cursor: default; | |||
} | |||
.rotatable-model.rm-is-2d img.rm-strip { | |||
display: none !important; | |||
} | |||
.rotatable-model.rm-is-2d img.rm-static { | |||
display: block !important; | |||
} | |||
.rotatable-model.rm-is-2d .rm-rotate-icon, | |||
.rotatable-model.rm-is-2d .rotatable-model-hint { | |||
display: none !important; | |||
} | |||
.rotatable-model-wrapper.rm-is-2d .rotatable-model-nav { | |||
visibility: hidden; | |||
pointer-events: none; | |||
} | |||
/* ============================== | |||
MODE TOGGLE — top-right corner | |||
============================== */ | |||
.rm-mode-toggle { | |||
position: absolute; | |||
top: 8px; | |||
right: 8px; | |||
z-index: 10; | |||
display: flex; | |||
gap: 0; | |||
border-radius: 6px; | |||
overflow: hidden; | |||
box-shadow: 0 1px 4px rgba(0,0,0,0.25); | |||
} | |||
.rm-mode-btn { | |||
display: inline-flex; | |||
align-items: center; | |||
justify-content: center; | |||
min-width: 36px; | |||
height: 32px; | |||
padding: 4px 8px; | |||
background: rgba(30, 30, 30, 0.55); | |||
border: none; | |||
cursor: pointer; | |||
transition: background 0.15s, opacity 0.15s; | |||
opacity: 0.7; | |||
pointer-events: auto; | |||
} | |||
.rm-mode-btn:first-child { | |||
border-right: 1px solid rgba(255,255,255,0.15); | |||
} | |||
.rm-mode-btn:hover { | |||
opacity: 1; | |||
background: rgba(30, 30, 30, 0.75); | |||
} | |||
.rm-mode-btn.rm-active { | |||
background: rgba(60, 130, 230, 0.85); | |||
opacity: 1; | |||
} | |||
.rm-mode-btn.rm-active:hover { | |||
background: rgba(60, 130, 230, 1); | |||
} | |||
/* Icon images inside buttons */ | |||
.rm-mode-icon { | |||
width: 20px; | |||
height: 20px; | |||
object-fit: contain; | |||
pointer-events: none; | |||
filter: brightness(0) invert(1); /* make icons white */ | |||
} | |||
/* No filter needed for text-only fallback */ | |||
.rm-mode-btn:not(:has(img)) { | |||
font-size: 13px; | |||
font-weight: 700; | |||
color: #fff; | |||
font-family: sans-serif; | |||
} | |||
/* ========================================== | |||
ROTATION ICON — bottom-right corner | |||
========================================== */ | |||
.rm-rotate-icon { | |||
position: absolute; | |||
bottom: 10px; | |||
right: 10px; | |||
z-index: 5; | |||
pointer-events: none; | |||
opacity: 0.6; | |||
transition: opacity 0.3s; | |||
} | |||
.rotatable-model:hover .rm-rotate-icon { | |||
opacity: 0.9; | |||
} | |||
.rm-rotate-icon img { | |||
width: 32px; | |||
height: 32px; | |||
object-fit: contain; | |||
filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); | |||
} | |||
/* ========================================== | |||
TEXT HINT — bottom-center (fades on drag) | |||
========================================== */ | |||
.rotatable-model-hint { | .rotatable-model-hint { | ||
position: absolute; | position: absolute; | ||
| Line 44: | Line 157: | ||
left: 50%; | left: 50%; | ||
transform: translateX(-50%); | transform: translateX(-50%); | ||
background: rgba(0, 0, 0, 0.65); | background: rgba(0,0,0,0.65); | ||
color: #fff; | color: #fff; | ||
padding: 4px 14px; | padding: 4px 14px; | ||
| Line 52: | Line 165: | ||
pointer-events: none; | pointer-events: none; | ||
opacity: 1; | opacity: 1; | ||
transition: opacity 0.4s | transition: opacity 0.4s; | ||
z-index: | z-index: 4; | ||
} | } | ||
.rotatable-model-hint.rm-hidden { | .rotatable-model-hint.rm-hidden { | ||
opacity: 0; | opacity: 0; | ||
} | } | ||
/* Loading | /* Loading */ | ||
.rotatable-model-loading { | .rotatable-model-loading { | ||
position: absolute; | position: absolute; | ||
| Line 71: | Line 183: | ||
} | } | ||
/* | /* ---- Nav buttons ---- */ | ||
.rotatable-model-nav { | .rotatable-model-nav { | ||
display: flex; | display: flex; | ||
| Line 77: | Line 189: | ||
gap: 4px; | gap: 4px; | ||
margin-top: 4px; | margin-top: 4px; | ||
transition: visibility 0.2s; | |||
} | } | ||
.rotatable-model-btn { | .rotatable-model-btn { | ||
display: inline-flex; | display: inline-flex; | ||
| Line 92: | Line 204: | ||
font-size: 14px; | font-size: 14px; | ||
color: #202122; | color: #202122; | ||
user-select: none; | user-select: none; | ||
transition: background 0.1s; | transition: background 0.1s; | ||
} | } | ||
.rotatable-model-btn:hover { background: #eaecf0; border-color: #72777d; } | |||
.rotatable-model-btn:hover { | .rotatable-model-btn:active { background: #c8ccd1; } | ||
} | |||
.rotatable-model-btn:active { | |||
} | |||
.rotatable-model-caption { | .rotatable-model-caption { | ||
| Line 110: | Line 214: | ||
color: #54595d; | color: #54595d; | ||
margin-top: 4px; | margin-top: 4px; | ||
} | } | ||