Refactor and enhance styling for spirit info component
This commit is contained in:
@@ -29,16 +29,14 @@
|
|||||||
height: 100vh;
|
height: 100vh;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: #000;
|
background: #000;
|
||||||
/* border-radius:15px; // Optional */
|
|
||||||
}
|
}
|
||||||
canvas {
|
canvas {
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%; top: 50%;
|
left: 50%; top: 50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
/* width/height wird von JS gesetzt */
|
|
||||||
/* Wichtig: Keine max-width/max-height */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#spirit-info {
|
#spirit-info {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -51,11 +49,11 @@
|
|||||||
border-radius: 18px;
|
border-radius: 18px;
|
||||||
font-family: 'Segoe UI', sans-serif;
|
font-family: 'Segoe UI', sans-serif;
|
||||||
box-shadow: 0 12px 64px #000a;
|
box-shadow: 0 12px 64px #000a;
|
||||||
width: 600px; /* Feste Standard-Breite Desktop */
|
width: 600px;
|
||||||
max-width: calc(100vw - 48px); /* Mindestens 24px Abstand außen */
|
max-width: calc(100vw - 48px);
|
||||||
min-width: 320px;
|
min-width: 320px;
|
||||||
height: auto;
|
height: auto;
|
||||||
max-height: calc(100vh - 48px); /* Mindestens 24px Abstand oben/unten */
|
max-height: calc(100dvh - 48px); /* Besser: dynamic viewport height */
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
padding: 40px 36px 32px 36px;
|
padding: 40px 36px 32px 36px;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
@@ -67,22 +65,24 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 18px;
|
gap: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#spirit-info h2 {
|
#spirit-info h2 {
|
||||||
margin: 0 0 8px 0;
|
margin: 0 0 8px 0;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
letter-spacing: 0.04em;
|
letter-spacing: 0.04em;
|
||||||
font-size: 1.6em;
|
font-size: 1.6em;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
word-break: keep-all; /* <- Bricht NUR bei Leerzeichen */
|
word-break: keep-all;
|
||||||
overflow-wrap: normal;
|
overflow-wrap: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 620px) {
|
/* "Desktop" und Mobile-Landscape (breit genug) */
|
||||||
|
@media (min-width: 620px) and (orientation: landscape) {
|
||||||
#spirit-info {
|
#spirit-info {
|
||||||
width: 600px;
|
width: 600px;
|
||||||
max-width: calc(100vw - 64px); /* Noch etwas mehr Abstand bei großem Screen */
|
max-width: calc(100vw - 64px);
|
||||||
min-width: 320px;
|
min-width: 320px;
|
||||||
max-height: calc(100vh - 64px);
|
max-height: calc(100dvh - 64px);
|
||||||
padding: 40px 40px 36px 40px;
|
padding: 40px 40px 36px 40px;
|
||||||
}
|
}
|
||||||
.spirit-info-flex {
|
.spirit-info-flex {
|
||||||
@@ -105,21 +105,20 @@
|
|||||||
}
|
}
|
||||||
#spirit-info .spirit-info-content {
|
#spirit-info .spirit-info-content {
|
||||||
flex: 1 1 0;
|
flex: 1 1 0;
|
||||||
min-width: 0; /* !!! Für korrektes Wrapping !!! */
|
min-width: 0;
|
||||||
max-width: 450px;
|
max-width: 450px;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
/* Optionale Optik: */
|
|
||||||
/* padding-left: 16px; */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 619px), (pointer: coarse) {
|
/* "Mobile Portrait" (Hochformat und schmal) */
|
||||||
|
@media (max-width: 619px), (orientation: portrait) {
|
||||||
#spirit-info {
|
#spirit-info {
|
||||||
width: 90vw;
|
width: 90vw;
|
||||||
max-width: 98vw;
|
max-width: 98vw;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
max-height: 80vh;
|
max-height: 80dvh; /* dynamic viewport height */
|
||||||
padding: 8vw 4vw 4vw 4vw;
|
padding: 8vw 4vw 4vw 4vw;
|
||||||
}
|
}
|
||||||
.spirit-info-flex {
|
.spirit-info-flex {
|
||||||
@@ -144,7 +143,6 @@
|
|||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
Reference in New Issue
Block a user