Template:Home/FeaturedRegionCard/styles.css: Difference between revisions
Template page
More actions
Eloise Zomia (talk | contribs) Created page with ".fr-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:1rem; align-items:stretch; } .fr-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;box-shadow:0 1px 2px rgba(0,0,0,.03);display:flex;flex-direction:column} .fr-media{background:#f3f4f6} .fr-img img{display:block;width:100%;height:auto} .fr-img--placeholder{display:flex;align-items:center;justify-content:center;min-height:160px;color:#6b7280;font-size:.9r..." |
Eloise Zomia (talk | contribs) No edit summary |
||
(19 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
/* FeaturedRegionCard — TemplateStyles-safe, minimal */ | |||
.fr- | /* Grid wrapper (use on Main Page section) */ | ||
.fr-grid { | |||
display: grid; | |||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | |||
gap: 16px; | |||
align-items: stretch; | |||
max-width: 1200px; | |||
margin: 0 auto; | |||
} | |||
.fr- | /* Card */ | ||
.fr- | .fr-card { | ||
.fr- | display: flex; | ||
.fr- | flex-direction: column; | ||
.fr-title{margin: | background: #ffffff; | ||
.fr-sub{margin:0 0 . | border: 1px solid #e5e7eb; | ||
.fr-hook{margin:0 0 . | border-radius: 12px; | ||
.fr-cta{ | overflow: hidden; | ||
.fr-missing{color:#9ca3af;font-style:italic} | box-shadow: 0 1px 2px rgba(0,0,0,.04); | ||
transition: box-shadow .2s ease; | |||
} | |||
.fr-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); } | |||
/* Media */ | |||
.fr-media { | |||
position: relative; | |||
height: 200px; | |||
background: #f3f4f6; | |||
overflow: hidden; | |||
} | |||
.fr-img, | |||
.fr-img a { display: block; height: 100%; } | |||
.fr-img img, | |||
.fr-img .mw-file-element { | |||
display: block; | |||
width: 100%; | |||
height: 100%; | |||
object-fit: cover; | |||
object-position: center; | |||
} | |||
/* make whole image clickable when Page= exists */ | |||
.fr-media-link, | |||
.fr-media-link a { | |||
position: absolute; | |||
top: 0; right: 0; bottom: 0; left: 0; | |||
display: block; | |||
text-decoration: none; | |||
} | |||
/* Body */ | |||
.fr-body { padding: 16px 18px 18px; display: flex; flex-direction: column; } | |||
.fr-title { margin: 0; font-size: 1.125rem; line-height: 1.25; color: #1f2937; font-weight: 700; } | |||
.fr-title a { color: #1f2937; text-decoration: none; } | |||
.fr-title a:hover { text-decoration: underline; color: #059669; } | |||
.fr-sub { margin: 2px 0 8px 0; color: #6b7280; font-size: .9rem; line-height: 1.3; } | |||
/* Status chip */ | |||
.fr-status { | |||
display: inline-flex; | |||
align-items: center; | |||
padding: 6px 12px; | |||
border-radius: 999px; | |||
background: #f8fafc; | |||
border: 1px solid #e5e7eb; | |||
font-weight: 600; | |||
font-size: .85rem; | |||
color: #374151; | |||
margin: 2px 0 10px 0; | |||
} | |||
.fr-status .fr-dot { | |||
width: 8px; height: 8px; border-radius: 50%; | |||
display: inline-block; margin-right: 8px; | |||
} | |||
.fr-status .fr-sep { margin: 0 8px; color: #9ca3af; font-weight: 400; } | |||
.fr-status .fr-acc { color: #6b7280; font-weight: 500; } | |||
/* Dot colors controlled by card’s status class */ | |||
.fr--status-stable .fr-status .fr-dot { background: #22c55e; } | |||
.fr--status-vulnerable .fr-status .fr-dot { background: #eab308; } | |||
.fr--status-endangered .fr-status .fr-dot { background: #f97316; } | |||
.fr--status-critical .fr-status .fr-dot { background: #ef4444; } | |||
.fr--status-extinct .fr-status .fr-dot { background: #6b7280; } | |||
.fr--status-unknown .fr-status .fr-dot { background: #9ca3af; } | |||
/* Hook + CTA */ | |||
.fr-hook { | |||
margin: 0 0 10px 0; | |||
color: #4b5563; | |||
line-height: 1.45; | |||
max-height: 4.5em; /* 3 lines */ | |||
overflow: hidden; | |||
} | |||
.fr-cta { margin-top: auto; } | |||
.fr-cta a { color: #059669; font-weight: 600; text-decoration: none; } | |||
.fr-cta a:hover { text-decoration: underline; color: #047857; } | |||
.fr-missing { color: #9ca3af; font-style: italic; } | |||
/* Responsive tweaks */ | |||
@media (min-width: 1024px) { .fr-media { height: 220px; } } | |||
@media (max-width: 480px) { .fr-media { height: 180px; } } | |||
/* --- kill any MW wrapper styling around each card --- */ | |||
.fr-grid > * { | |||
background: transparent !important; | |||
border: 0 !important; | |||
border-radius: 0 !important; | |||
box-shadow: none !important; | |||
padding: 0 !important; | |||
margin: 0 !important; | |||
} | |||
/* --- lock the status chip to its intended size --- */ | |||
.fr-status { | |||
display: inline-flex !important; | |||
align-items: center !important; | |||
padding: 6px 12px !important; | |||
margin: 4px 0 12px 0 !important; | |||
background: #f8fafc !important; | |||
border: 1px solid #e5e7eb !important; | |||
border-radius: 999px !important; | |||
width: auto !important; | |||
height: auto !important; | |||
box-shadow: none !important; | |||
} | |||
.fr-status::before, | |||
.fr-status::after { content: none !important; } /* in case a skin adds pseudo-elements */ |
Latest revision as of 08:14, 25 August 2025
/* FeaturedRegionCard — TemplateStyles-safe, minimal */ /* Grid wrapper (use on Main Page section) */ .fr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: stretch; max-width: 1200px; margin: 0 auto; } /* Card */ .fr-card { display: flex; flex-direction: column; background: #ffffff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: box-shadow .2s ease; } .fr-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); } /* Media */ .fr-media { position: relative; height: 200px; background: #f3f4f6; overflow: hidden; } .fr-img, .fr-img a { display: block; height: 100%; } .fr-img img, .fr-img .mw-file-element { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; } /* make whole image clickable when Page= exists */ .fr-media-link, .fr-media-link a { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: block; text-decoration: none; } /* Body */ .fr-body { padding: 16px 18px 18px; display: flex; flex-direction: column; } .fr-title { margin: 0; font-size: 1.125rem; line-height: 1.25; color: #1f2937; font-weight: 700; } .fr-title a { color: #1f2937; text-decoration: none; } .fr-title a:hover { text-decoration: underline; color: #059669; } .fr-sub { margin: 2px 0 8px 0; color: #6b7280; font-size: .9rem; line-height: 1.3; } /* Status chip */ .fr-status { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; background: #f8fafc; border: 1px solid #e5e7eb; font-weight: 600; font-size: .85rem; color: #374151; margin: 2px 0 10px 0; } .fr-status .fr-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; } .fr-status .fr-sep { margin: 0 8px; color: #9ca3af; font-weight: 400; } .fr-status .fr-acc { color: #6b7280; font-weight: 500; } /* Dot colors controlled by card’s status class */ .fr--status-stable .fr-status .fr-dot { background: #22c55e; } .fr--status-vulnerable .fr-status .fr-dot { background: #eab308; } .fr--status-endangered .fr-status .fr-dot { background: #f97316; } .fr--status-critical .fr-status .fr-dot { background: #ef4444; } .fr--status-extinct .fr-status .fr-dot { background: #6b7280; } .fr--status-unknown .fr-status .fr-dot { background: #9ca3af; } /* Hook + CTA */ .fr-hook { margin: 0 0 10px 0; color: #4b5563; line-height: 1.45; max-height: 4.5em; /* 3 lines */ overflow: hidden; } .fr-cta { margin-top: auto; } .fr-cta a { color: #059669; font-weight: 600; text-decoration: none; } .fr-cta a:hover { text-decoration: underline; color: #047857; } .fr-missing { color: #9ca3af; font-style: italic; } /* Responsive tweaks */ @media (min-width: 1024px) { .fr-media { height: 220px; } } @media (max-width: 480px) { .fr-media { height: 180px; } } /* --- kill any MW wrapper styling around each card --- */ .fr-grid > * { background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; } /* --- lock the status chip to its intended size --- */ .fr-status { display: inline-flex !important; align-items: center !important; padding: 6px 12px !important; margin: 4px 0 12px 0 !important; background: #f8fafc !important; border: 1px solid #e5e7eb !important; border-radius: 999px !important; width: auto !important; height: auto !important; box-shadow: none !important; } .fr-status::before, .fr-status::after { content: none !important; } /* in case a skin adds pseudo-elements */