Template:Content/styles.css: Difference between revisions
Jump to navigation
Jump to search
No edit summary Tag: Manual revert |
No edit summary |
||
| Line 11: | Line 11: | ||
.tile { | .tile { | ||
width: 180px; | width: 180px; | ||
height: 240px; | height: 240px; | ||
padding: 0.5em; | padding: 0.5em; | ||
background: # | background: var(--mw-content-background-color, #f5f0dc); /* Match wiki theme */ | ||
border: 1px solid #c8b68e; | border: 1px solid var(--mw-content-border-color, #c8b68e); | ||
border-radius: 6px; | border-radius: 6px; | ||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); | ||
| Line 24: | Line 24: | ||
box-sizing: border-box; | box-sizing: border-box; | ||
overflow: hidden; | overflow: hidden; | ||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; | |||
color: var(--mw-text-color, #222); | |||
} | } | ||
| Line 43: | Line 45: | ||
} | } | ||
/* | /* Cropped image */ | ||
.tile-top img { | .tile-top img { | ||
width: 100%; | width: 100%; | ||
height: 100%; | height: 100%; | ||
object-fit: cover; /* | object-fit: cover; /* Crop image to fit */ | ||
display: block; | display: block; | ||
} | } | ||
/* Text label */ | /* Text label below image */ | ||
.tile-bottom { | .tile-bottom { | ||
font-size: 1em; | font-size: 1em; | ||
font-weight: 500; | font-weight: 500; | ||
text-align: center; | text-align: center; | ||
width: 100%; | width: 100%; | ||
| Line 65: | Line 66: | ||
} | } | ||
/* Unstyle links */ | /* Unstyle links inside tile */ | ||
.tile-bottom a, | .tile-bottom a, | ||
.tile-top a { | .tile-top a { | ||
| Line 88: | Line 89: | ||
} | } | ||
/* Mobile | /* Mobile responsiveness */ | ||
@media (max-width: 800px) { | @media (max-width: 800px) { | ||
.tile { | .tile { | ||
Revision as of 05:26, 26 July 2025
.tile-row {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 2em;
margin: 2em auto;
max-width: 1200px;
}
/* Tile container */
.tile {
width: 180px;
height: 240px;
padding: 0.5em;
background: var(--mw-content-background-color, #f5f0dc); /* Match wiki theme */
border: 1px solid var(--mw-content-border-color, #c8b68e);
border-radius: 6px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
transition: transform 0.2s, box-shadow 0.2s;
box-sizing: border-box;
overflow: hidden;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
color: var(--mw-text-color, #222);
}
.tile:hover {
transform: scale(1.03);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
/* Image container */
.tile-top {
width: 100%;
height: 140px;
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
overflow: hidden;
padding: 0;
}
/* Cropped image */
.tile-top img {
width: 100%;
height: 100%;
object-fit: cover; /* Crop image to fit */
display: block;
}
/* Text label below image */
.tile-bottom {
font-size: 1em;
font-weight: 500;
text-align: center;
width: 100%;
padding: 0.5em 0 0.3em 0;
margin: 0;
border: none;
box-sizing: border-box;
background: none;
}
/* Unstyle links inside tile */
.tile-bottom a,
.tile-top a {
all: unset;
font-size: inherit;
font-weight: inherit;
color: inherit;
display: inline-block;
text-align: center;
line-height: 1.4;
border: none;
background: none;
padding: 0;
margin: 0;
cursor: pointer;
}
.tile-bottom a:hover,
.tile-top a:hover {
text-decoration: underline;
color: #000;
}
/* Mobile responsiveness */
@media (max-width: 800px) {
.tile {
width: 45%;
height: auto;
}
.tile-top {
height: 120px;
}
}