MediaWiki:Common.css: Difference between revisions
From Cobi Collectors Wiki
No edit summary |
No edit summary |
||
| Line 277: | Line 277: | ||
@media screen and (max-width: 850px) { | @media screen and (max-width: 850px) { | ||
/* 1. Haupt- | /* 1. Haupt-Stapelung der Boxen */ | ||
div.mainparent { | div.mainparent { | ||
display: flex !important; | display: flex !important; | ||
flex-direction: column !important; | flex-direction: column !important; | ||
width: 100% !important; | width: 100% !important; | ||
} | } | ||
/* Reihenfolge-Fix */ | |||
.box1 { order: 1 !important; } | .box1 { order: 1 !important; } | ||
.box2 { order: 2 !important; } | .box2 { order: 2 !important; } | ||
| Line 293: | Line 290: | ||
.box4 { order: 4 !important; } | .box4 { order: 4 !important; } | ||
/* 2. BOX 4: Radikaler Fix für Nebeneinander-Darstellung */ | |||
/* 2. BOX 4: | |||
.box4-content { | .box4-content { | ||
display: | display: block !important; /* Wir wechseln auf Block-Basis... */ | ||
text-align: center !important; /* ...und zentrieren den Inhalt */ | |||
width: 100% !important; | width: 100% !important; | ||
} | } | ||
/* | /* Wir zwingen JEDES Element in Box 4, sich wie ein Wort im Text zu verhalten */ | ||
.box4-content | .box4-content * { | ||
display: inline-flex !important; | |||
display: inline- | |||
width: auto !important; | width: auto !important; | ||
max-width: none !important; | |||
} | } | ||
.box4-content a { | .box4-content a, | ||
display: inline-block !important; | .box4-content .mw-file-description { | ||
display: inline-block !important; /* Das ist der entscheidende Befehl */ | |||
width: 42% !important; /* Zwei Bilder nebeneinander (42% + 42% + Margins) */ | |||
margin: | margin: 5px !important; | ||
vertical-align: top !important; | |||
} | } | ||
.box4-content img { | .box4-content img { | ||
width: 100% !important; | width: 100% !important; /* Füllt die 42% des Links aus */ | ||
max-width: | max-width: 110px !important; /* Absolute Obergrenze pro Bild */ | ||
height: auto !important; | height: auto !important; | ||
display: block !important; | |||
margin: 0 auto !important; | |||
} | } | ||
/* 3. Bricks | /* 3. Bricks skalieren */ | ||
.brickparent.size-large a, | .brickparent.size-large a, | ||
.brickparent.size-large .mw-file-description, | .brickparent.size-large .mw-file-description, | ||
| Line 338: | Line 329: | ||
} | } | ||
/* 4. Innercenter */ | /* 4. Innercenter auf Handy-Grid */ | ||
.innercenter { | .innercenter { | ||
grid-template-columns: repeat(auto-fill, minmax( | display: grid !important; | ||
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important; | |||
gap: 8px !important; | gap: 8px !important; | ||
} | } | ||
} | } | ||
Revision as of 21:02, 1 February 2026
/* ==========================================================================
1. VARIABLEN & BASIS-STYLING
========================================================================== */
:root {
--bg-light: #ebecf0;
--border-gray: 1px solid #aaa;
--shadow-dark: 5px 5px 10px black;
--accent-blue: #9FB6CD;
}
.mw-parser-output img {
max-width: 100%;
height: auto;
}
/* Gemeinsame Basis für alle Box-Elemente */
.infobox, .headersetpage, .headernocolumn, .headercatpage,
.box1, .box2, .box3, .box4 {
background: var(--bg-light);
border: var(--border-gray);
box-shadow: var(--shadow-dark);
box-sizing: border-box;
}
/* ==========================================================================
2. BOX-ELEMENTE & HEADERS
========================================================================== */
.infobox {
float: right;
margin: 0 0 0.5em 0.5em;
padding: 0.5em;
width: 300px;
vertical-align: middle;
}
.headersetpage, .headernocolumn, .headercatpage {
width: 100%;
margin-bottom: 20px;
padding: 8px 15px;
font-size: 18px;
}
.headernocolumn { height: 80px; font-size: 16px; }
.headercatpage { height: 100px; }
.textbox {
width: 50%;
background: var(--bg-light);
border: 2px solid var(--accent-blue);
padding: 8px 15px;
margin: 0 auto;
}
.box-headline {
background-color: var(--accent-blue);
font-size: 16px;
padding: 8px 12px;
margin-bottom: 15px;
border: 1px solid #8aa3bc;
border-radius: 4px;
font-weight: bold;
display: block;
box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
text-align: left !important;
}
/* ==========================================================================
3. LOGO & TEXT BEREICH
========================================================================== */
.aboutsetlogo {
width: 150px;
float: left;
margin: 0 30px 15px 0;
}
.aboutsetlogo img {
width: 100% !important;
height: auto !important;
}
.aboutsettext {
overflow: hidden;
min-height: 120px;
}
/* ==========================================================================
4. TABELLEN (COBITABLE)
========================================================================== */
.cobitable {
background-color: #f8f9fa;
color: #202122;
margin: 1em auto;
border: 1px solid #000;
border-collapse: collapse;
display: table;
overflow-x: auto;
width: fit-content;
max-width: 100%;
box-shadow: var(--shadow-dark);
border-radius: 4px;
}
.cobitable th, .cobitable td {
border: 1px solid #444 !important;
padding: 0.6em 0.8em;
}
.cobitable th {
background-color: var(--accent-blue);
font-weight: bold;
text-align: center;
}
/* ==========================================================================
5. GRIDS (MAINPAGE)
========================================================================== */
.mainparent {
display: grid;
grid-template-columns: 4fr 6fr;
gap: 15px;
}
.box1 { grid-column: 1 / 3; padding: 15px; }
.box2 { grid-column: 1; padding: 15px; }
.box3 { grid-column: 1; padding: 15px; }
.box4 { grid-column: 2; grid-row: 2 / 4; padding: 15px; text-align: center; }
.box4-content {
display: flex !important;
flex-wrap: wrap !important;
justify-content: center !important;
margin-top: 15px;
}
.box4-content p,
.box4-content span {
display: contents !important;
}
.box4-content a,
.box4-content .mw-file-description {
display: block !important;
flex: 0 0 150px !important;
margin: 2px !important; /* Hier kannst du den Abstand anpassen */
padding: 5px; /* Puffer für den Hintergrund-Effekt */
transition: all 0.2s ease-in-out !important;
border-radius: 8px;
text-decoration: none !important;
}
/* Der neue Hover: Kein Wackeln, kein Scale, nur Licht & Farbe */
.box4-content a:hover,
.box4-content .mw-file-description:hover {
background-color: rgba(159, 182, 205, 0.25); /* Sanfter bläulicher Schimmer */
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Hebt das Bild optisch an */
}
.box4-content img {
width: 150px !important;
height: auto !important;
border-radius: 4px;
display: block;
/* Schatten ist standardmäßig sehr dezent */
filter: drop-shadow(1px 1px 3px rgba(0,0,0,0.1));
}
.innercenter {
display: grid !important;
grid-template-columns: repeat(auto-fill, minmax(100px, 150px));
gap: 15px;
justify-content: flex-start;
align-items: center;
margin: 10px 0;
}
/* Wir bändigen alle direkten Kinder */
.innercenter > * {
display: block !important;
width: 100% !important;
max-width: 150px !important;
}
/* Das Bild passt sich dem Grid-Platz an */
.innercenter img {
width: auto !important;
max-width: 100% !important;
height: auto !important;
display: block;
margin: 0 auto !important;
/* Schärfe-Optimierung */
image-rendering: -webkit-optimize-contrast;
image-rendering: crisp-edges;
}
.innercenter a,
.innercenter .mw-file-description {
display: inline-block !important;
transition: all 0.2s ease-in-out !important; /* "all" für sanftes Leuchten */
cursor: pointer;
padding: 8px; /* Etwas mehr Puffer für den Hintergrund-Effekt */
border-radius: 8px;
}
/* DER KONSISTENTE HOVER (Kein Scale!) */
.innercenter a:hover,
.innercenter .mw-file-description:hover {
background-color: rgba(159, 182, 205, 0.25) !important;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
/* transform: scale(1.05); <-- Entfernt für maximale Schärfe */
z-index: 10;
}
/* ==========================================================================
6. BRICK-CONTAINER (SHARP HOVER UPDATE)
========================================================================== */
/* BASIS & GEMEINSAME LOGIK */
.brickparent {
display: block !important;
text-align: left !important;
padding: 25px;
background: #ebecf0;
border: var(--border-gray);
box-shadow: var(--shadow-dark);
border-radius: 8px;
margin: 20px 0;
line-height: 0;
}
.brickparent p { display: inline !important; margin: 0; }
.brickparent a,
.brickparent .mw-file-description {
display: inline-block !important;
vertical-align: top !important;
margin: 8px !important; /* Dein angepasster Abstand */
padding: 8px; /* Puffer für das Hintergrund-Leuchten */
transition: all 0.2s ease-in-out !important; /* "all" statt nur "transform" */
border-radius: 6px;
line-height: normal;
}
/* DER SCHARFE HOVER (Kein Scale!) */
.brickparent a:hover,
.brickparent .mw-file-description:hover {
background-color: rgba(159, 182, 205, 0.3) !important;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); /* Dezentes Anheben */
/* transform: scale(1.05); <-- Entfernt, damit es scharf bleibt */
}
.brickparent img {
display: block !important;
image-rendering: -webkit-optimize-contrast;
image-rendering: crisp-edges;
/* Optional: Ein minimaler Schatten direkt am Bild für mehr Tiefe */
filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.05));
}
/* --- GRÖSSEN-VARIANTEN (unverändert in der Logik) --- */
.brickparent.size-small a,
.brickparent.size-small .mw-file-description,
.brickparent.size-small img {
width: 110px !important; /* Deine verkleinerten Werte */
height: auto !important;
}
.brickparent.size-large a,
.brickparent.size-large .mw-file-description,
.brickparent.size-large img {
width: 250px !important;
height: 67px !important;
}
/* ==========================================================================
7. MOBILE OPTIMIERUNG (REIHENFOLGE & STACKING FIX)
========================================================================== */
@media screen and (max-width: 850px) {
/* 1. Haupt-Stapelung der Boxen */
div.mainparent {
display: flex !important;
flex-direction: column !important;
width: 100% !important;
}
/* Reihenfolge-Fix */
.box1 { order: 1 !important; }
.box2 { order: 2 !important; }
.box3 { order: 3 !important; }
.box4 { order: 4 !important; }
/* 2. BOX 4: Radikaler Fix für Nebeneinander-Darstellung */
.box4-content {
display: block !important; /* Wir wechseln auf Block-Basis... */
text-align: center !important; /* ...und zentrieren den Inhalt */
width: 100% !important;
}
/* Wir zwingen JEDES Element in Box 4, sich wie ein Wort im Text zu verhalten */
.box4-content * {
display: inline-flex !important;
width: auto !important;
max-width: none !important;
}
.box4-content a,
.box4-content .mw-file-description {
display: inline-block !important; /* Das ist der entscheidende Befehl */
width: 42% !important; /* Zwei Bilder nebeneinander (42% + 42% + Margins) */
margin: 5px !important;
vertical-align: top !important;
}
.box4-content img {
width: 100% !important; /* Füllt die 42% des Links aus */
max-width: 110px !important; /* Absolute Obergrenze pro Bild */
height: auto !important;
display: block !important;
margin: 0 auto !important;
}
/* 3. Bricks skalieren */
.brickparent.size-large a,
.brickparent.size-large .mw-file-description,
.brickparent.size-large img {
width: 100% !important;
max-width: 150px !important;
height: auto !important;
}
/* 4. Innercenter auf Handy-Grid */
.innercenter {
display: grid !important;
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
gap: 8px !important;
}
}
