Template:PortalPlaceCard/styles.css
Template page
More actions
/* ============================================ */
/* PLACE CARDS (places browser) */
/* Template:PortalPlaceCard/styles.css */
/* Same markup from Template:PortalPlaceCard */
/* and the place renderer in */
/* MediaWiki:FacetBrowser.js */
/* ============================================ */
/* -------------------------------------------- */
/* GRID */
/* The fallback feed and the script's results */
/* both carry .pn-feed__grid. Scoped to */
/* .lw-places so a page that also loads the */
/* news portal sheet keeps that sheet's grid. */
/* -------------------------------------------- */
.lw-places .pn-feed__grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
gap: 0.6rem;
margin-top: 0.75rem;
}
/* -------------------------------------------- */
/* CARD */
/* -------------------------------------------- */
.lw-place-card {
display: flex;
align-items: stretch;
min-width: 0;
background: #ffffff;
border: 1px solid #e1e6df;
border-left: 2px solid #2d6a4f;
border-radius: 6px;
overflow: hidden;
transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.lw-place-card:hover {
border-color: #c5d2c0;
border-left-color: #2d6a4f;
box-shadow: 0 2px 8px rgba(20, 40, 25, 0.06);
}
/* Template line breaks can leave empty paragraphs */
.lw-place-card p {
margin: 0;
}
.lw-place-card p:empty {
display: none;
}
.lw-place-card__thumb {
position: relative;
display: block;
flex: 0 0 96px;
width: 96px;
min-height: 96px;
overflow: hidden;
background-color: #e8efe4;
}
.lw-place-card__thumb--none {
background-image: url("https://landrace.wiki/index.php?title=Special:Redirect/file/Icon-geography.png");
background-position: center;
background-repeat: no-repeat;
background-size: 36px auto;
}
/* The fallback wraps its image in MediaWiki's file span and link */
.lw-place-card__thumb span,
.lw-place-card__thumb a {
display: block;
height: 100%;
}
/* Out of flow, so a portrait photograph cannot make its card taller */
.lw-place-card__thumb img {
position: absolute;
top: 0;
left: 0;
display: block;
width: 100% !important;
height: 100% !important;
object-fit: cover;
}
.lw-place-card__text {
display: flex;
flex: 1 1 auto;
flex-direction: column;
align-items: flex-start;
gap: 0.15rem;
min-width: 0;
padding: 0.45rem 0.7rem 0.5rem;
}
.lw-place-card__type {
font-size: 0.55rem;
font-weight: 700;
line-height: 1;
text-transform: uppercase;
letter-spacing: 0.06em;
padding: 0.2rem 0.45rem;
border-radius: 999px;
background: #2d6a4f;
color: #ffffff;
white-space: nowrap;
}
.lw-place-card__name {
font-size: 0.95rem;
font-weight: 700;
line-height: 1.25;
color: #1a2612;
overflow-wrap: anywhere;
}
.lw-place-card__name a {
color: inherit;
text-decoration: none;
}
.lw-place-card__name a:hover {
text-decoration: underline;
}
.lw-place-card__where {
font-size: 0.72rem;
line-height: 1.35;
color: #5a6650;
font-style: italic;
overflow-wrap: anywhere;
}
.lw-place-card__where:empty {
display: none;
}
.lw-place-card__elev {
font-size: 0.72rem;
line-height: 1.35;
color: #34402d;
}
.lw-place-card__label {
font-size: 0.6rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.04em;
color: #7a8472;
}
/* -------------------------------------------- */
/* MOBILE */
/* -------------------------------------------- */
@media (max-width: 600px) {
.lw-place-card__thumb {
flex-basis: 80px;
width: 80px;
min-height: 80px;
}
.lw-place-card__text {
padding: 0.4rem 0.6rem 0.45rem;
}
.lw-place-card__name {
font-size: 0.9rem;
}
}