MediaWiki:Common.css: Unterschied zwischen den Versionen
Admin (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
Admin (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
| Zeile 1: | Zeile 1: | ||
/* Das folgende CSS wird für alle Benutzeroberflächen geladen. */ | /* Das folgende CSS wird für alle Benutzeroberflächen geladen. */ | ||
/* --- Layout für die drei Bewertungsboxen --- */ | /* --- Layout für die drei Bewertungsboxen --- */ | ||
| Zeile 433: | Zeile 184: | ||
@media (max-width: 480px) { | @media (max-width: 480px) { | ||
.whisky-glass { width: 32px; height: 32px; } | .whisky-glass { width: 32px; height: 32px; } | ||
} | } | ||
Version vom 7. Oktober 2025, 21:20 Uhr
/* Das folgende CSS wird für alle Benutzeroberflächen geladen. */
/* --- Layout für die drei Bewertungsboxen --- */
.whisky-rating {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 14px;
margin: 1rem 0 1.5rem;
}
.whisky-rating__item {
border: 1px solid #e5e7eb;
border-radius: 12px;
padding: 12px 14px;
box-shadow: 0 1px 3px rgba(0,0,0,.06);
background: #fff;
}
.whisky-rating__label {
font-weight: 600;
margin-bottom: .5rem;
color: #111827;
}
/* --- Container für die Gläser --- */
.whisky-rating__widget {
display: flex; /* flex statt inline-flex */
flex-wrap: wrap; /* erlaubt Umbruch bei kleinen Screens */
align-items: center;
}
/* --- Gläser (Button) --- */
.whisky-glass {
display: inline-block; /* verhindert Überlappungen */
width: 28px;
height: 28px;
margin: 0 6px 6px 0; /* Abstand zwischen den Gläsern */
border: 0;
padding: 0;
background: none;
cursor: pointer;
background-image: url("/index.php?title=Special:FilePath/Whisky_empty.png");
background-size: contain;
background-repeat: no-repeat;
background-position: center;
line-height: 0;
vertical-align: middle;
box-sizing: content-box;
opacity: .8;
transition: opacity .08s ease, filter .08s ease;
}
/* --- Aktive (gefüllte) Gläser --- */
.whisky-glass.is-active {
background-image: url("/index.php?title=Special:FilePath/Whisky_filled.png");
opacity: 1;
}
/* --- Hover/Fokus-Effekt --- */
.whisky-glass:hover,
.whisky-glass:focus {
opacity: 1;
outline: none;
filter: drop-shadow(0 0 0.4px rgba(0,0,0,.25));
}
/* --- Textbereich unter den Gläsern --- */
.whisky-rating__meta {
margin-top: .4rem;
font-size: .9rem;
color: #4b5563;
}
/* --- Zustand: nicht eingeloggt --- */
.whisky-rating--disabled .whisky-glass {
cursor: not-allowed;
filter: grayscale(0.3) opacity(.5);
}
/* --- Mobile: kleinere Gläser --- */
@media (max-width: 420px) {
.whisky-glass { width: 26px; height: 26px; margin: 0 5px 5px 0; }
}
.whisky-overall-badge {
display: inline-block;
margin-left: .5rem;
padding: .1rem .45rem;
border-radius: .5rem;
background: #111827;
color: #fff;
font-weight: 600;
font-size: .95rem;
line-height: 1.2;
}
/* Tabelle für Whisky-Bewertungen */
.whisky-summary__table {
border-collapse: collapse;
margin-top: 0.5em;
width: auto; /* oder 100% */
}
.whisky-summary__table th,
.whisky-summary__table td {
padding: 0.4em 0.8em;
text-align: left;
}
.whisky-summary__table th {
background: #f5f5f5;
font-weight: 600;
}
.whisky-summary__table tr:nth-child(even) td {
background: #fafafa;
}
/* Letzte Zeile (Gesamt) hervorheben */
.whisky-summary__table tr:last-child td {
padding-top: 0.6em;
padding-bottom: 0.6em;
border-top: 2px solid #333;
font-weight: bold;
background: #fff9e6;
}
/* Whisky Ø-Balken */
.whisky-bar {
display: flex;
align-items: center;
gap: .5rem;
min-width: 160px; /* Platz für den Balken */
}
.whisky-bar__track {
position: relative;
flex: 1 1 auto;
height: 10px;
background: #ececec;
border-radius: 999px;
overflow: hidden;
box-shadow: inset 0 1px 2px rgba(0,0,0,.06);
}
.whisky-bar__fill {
height: 100%;
width: 0%;
border-radius: 999px;
background: linear-gradient(90deg, #f0b429, #d97706); /* bernstein */
transition: width .35s ease;
}
.whisky-bar__value {
font-variant-numeric: tabular-nums;
min-width: 3ch; /* z. B. “7.5” */
text-align: right;
}
/* bessere Touch-Fläche */
.whisky-rating__widget {
display: flex;
gap: 6px;
flex-wrap: wrap;
}
/* Buttons: Größe & Klickfläche, aber Bild erhalten */
.whisky-glass {
width: 36px;
height: 36px;
padding: 0;
border: none;
background-color: transparent; /* NICHT: background: transparent; */
touch-action: manipulation;
/* falls noch nicht gesetzt: */
background-repeat: no-repeat;
background-position: center;
background-size: contain; /* oder 100% 100% */
display: inline-block; /* sicherheitshalber */
cursor: pointer;
}
@media (max-width: 480px) {
.whisky-glass { width: 32px; height: 32px; }
}