Template:CardPages/styles.css: Difference between revisions
Template page
More actions
BelowTheEcho (talk | contribs) No edit summary |
BelowTheEcho (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
/* ================================ | |||
BANNER WRAPPER | |||
================================ */ | |||
.event-banner { | .event-banner { | ||
position: relative; | position: relative; /* Allows background layering */ | ||
width: 100%; | width: 100%; /* Full page width */ | ||
margin: 20px 0; | margin: 20px 0; | ||
border-radius: 20px; | border-radius: 20px; | ||
overflow: visible; /* Prevents content from being cut off */ | |||
overflow: | |||
} | } | ||
/* Background layer (visual only) */ | |||
.banner-bg-wrapper { | .banner-bg-wrapper { | ||
position: absolute; | position: absolute; | ||
margin: 0; /* top/right/bottom/left = 0 */ | |||
border-radius: 20px; | border-radius: 20px; | ||
z-index: 1; | z-index: 1; | ||
/* | /* background can go here */ | ||
} | } | ||
/* Content layer */ | |||
.banner-overlay { | .banner-overlay { | ||
position: relative; | position: relative; | ||
z-index: 2; | z-index: 2; /* Above background */ | ||
padding: 10px | padding: 10px 16px; /* Controlled padding */ | ||
} | } | ||
/* ================================ | |||
FLEX LAYOUT (CRITICAL PART) | |||
================================ */ | |||
.element-container { | .element-container { | ||
display: flex; | display: flex; /* Enables flexbox */ | ||
flex-wrap: nowrap; | flex-wrap: nowrap; /* FORCE one single row */ | ||
width: 100%; | width: 100%; | ||
} | } | ||
/* Each element box */ | |||
.element-item { | .element-item { | ||
flex: 0 0 calc(100% / 7); | flex: 0 0 calc(100% / 7); /* EXACTLY 7 equal columns */ | ||
min-width: 0; /* | min-width: 0; /* ALLOWS shrinking (prevents scrollbar) */ | ||
} | } | ||
.element- | |||
display: | /* ================================ | ||
CLICKABLE CONTENT | |||
================================ */ | |||
.element-link { | |||
display: flex; /* Stack image + text */ | |||
flex-direction: column; | |||
align-items: center; /* Center horizontally */ | |||
text-align: center; | |||
text-decoration: none; /* Remove underline */ | |||
color: inherit; /* Keep custom colors */ | |||
} | } | ||
.element- | /* MediaWiki image wrapper */ | ||
.element-link .image { | |||
display: block; | |||
width: 100%; | width: 100%; | ||
text-align: center; | |||
} | } | ||
.element- | /* Actual image */ | ||
.element-link img { | |||
width: 100%; /* Fill available box width */ | |||
max-width: 90px; /* Cap image size */ | |||
height: auto; /* Preserve aspect ratio */ | |||
display: block; | display: block; | ||
margin: 0 auto 4px; /* Center + small gap */ | |||
} | |||
/* Text label */ | |||
.element-link span { | |||
font-weight: bold; | font-weight: bold; | ||
font-size: 0.9rem; | |||
} | } | ||
/* ================================ | |||
PER-ELEMENT COLORS | |||
================================ */ | |||
.fire-text { color: #e25822; } | |||
.water-text { color: #3b82f6; } | |||
.fire-text { color: #e25822; } | .earth-text { color: #65a30d; } | ||
.water-text { color: #3b82f6; } | .air-text { color: #94a3b8; } | ||
.earth-text { color: #65a30d; } | .voidal-text { color: #6b21a8; } | ||
.air-text { color: #94a3b8; } | |||
.voidal-text { color: #6b21a8; } | |||
.aetheric-text { color: #facc15; } | .aetheric-text { color: #facc15; } | ||
.neutral-text { color: #64748b; } | .neutral-text { color: #64748b; } | ||
/* ================================ | |||
RESPONSIVE FALLBACK | |||
(ONLY when screen is too narrow) | |||
================================ */ | |||
@media (max-width: 700px) { | |||
@media | |||
.element-container { | .element-container { | ||
flex-wrap: wrap; | flex-wrap: wrap; /* Allow wrapping */ | ||
} | } | ||
.element-item { | .element-item { | ||
flex: 0 0 | flex: 0 0 33.333%; /* 3 per row */ | ||
} | } | ||
} | } | ||
@media | @media (max-width: 450px) { | ||
.element-item { | .element-item { | ||
flex: 0 0 | flex: 0 0 50%; /* 2 per row */ | ||
} | } | ||
} | } | ||
Revision as of 16:25, 21 January 2026
/* ================================
BANNER WRAPPER
================================ */
.event-banner {
position: relative; /* Allows background layering */
width: 100%; /* Full page width */
margin: 20px 0;
border-radius: 20px;
overflow: visible; /* Prevents content from being cut off */
}
/* Background layer (visual only) */
.banner-bg-wrapper {
position: absolute;
margin: 0; /* top/right/bottom/left = 0 */
border-radius: 20px;
z-index: 1;
/* background can go here */
}
/* Content layer */
.banner-overlay {
position: relative;
z-index: 2; /* Above background */
padding: 10px 16px; /* Controlled padding */
}
/* ================================
FLEX LAYOUT (CRITICAL PART)
================================ */
.element-container {
display: flex; /* Enables flexbox */
flex-wrap: nowrap; /* FORCE one single row */
width: 100%;
}
/* Each element box */
.element-item {
flex: 0 0 calc(100% / 7); /* EXACTLY 7 equal columns */
min-width: 0; /* ALLOWS shrinking (prevents scrollbar) */
}
/* ================================
CLICKABLE CONTENT
================================ */
.element-link {
display: flex; /* Stack image + text */
flex-direction: column;
align-items: center; /* Center horizontally */
text-align: center;
text-decoration: none; /* Remove underline */
color: inherit; /* Keep custom colors */
}
/* MediaWiki image wrapper */
.element-link .image {
display: block;
width: 100%;
text-align: center;
}
/* Actual image */
.element-link img {
width: 100%; /* Fill available box width */
max-width: 90px; /* Cap image size */
height: auto; /* Preserve aspect ratio */
display: block;
margin: 0 auto 4px; /* Center + small gap */
}
/* Text label */
.element-link span {
font-weight: bold;
font-size: 0.9rem;
}
/* ================================
PER-ELEMENT COLORS
================================ */
.fire-text { color: #e25822; }
.water-text { color: #3b82f6; }
.earth-text { color: #65a30d; }
.air-text { color: #94a3b8; }
.voidal-text { color: #6b21a8; }
.aetheric-text { color: #facc15; }
.neutral-text { color: #64748b; }
/* ================================
RESPONSIVE FALLBACK
(ONLY when screen is too narrow)
================================ */
@media (max-width: 700px) {
.element-container {
flex-wrap: wrap; /* Allow wrapping */
}
.element-item {
flex: 0 0 33.333%; /* 3 per row */
}
}
@media (max-width: 450px) {
.element-item {
flex: 0 0 50%; /* 2 per row */
}
}