MediaWiki:Common.css: Difference between revisions

From davispedia
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
@media screen and (min-width: 701px) {
.davispedia-feature-grid {
.davispedia-feature-grid {
display: grid;
grid-auto-rows: 1fr;
grid-template-columns: repeat(2, minmax(0, 1fr));
}
grid-auto-rows: 1fr;
align-items: stretch;
gap: 1rem;
margin: 1.5rem 0;
}
}


.davispedia-feature-card {
.davispedia-feature-card {
display: flex;
flex-direction: column;
box-sizing: border-box;
min-width: 0;
height: 100%;
height: 100%;
min-height: 160px;
padding: 1.4rem 1.5rem;
border: 1px solid rgba(0, 0, 0, 0.12);
border-radius: 12px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.davispedia-feature-card h2 {
margin: 0 0 0.65rem;
padding: 0;
border: 0;
font-size: 1.35rem;
line-height: 1.25;
}
.davispedia-feature-card h2 a {
color: #202122;
text-decoration: none;
}
.davispedia-feature-card h2 a:hover,
.davispedia-feature-card h2 a:focus {
text-decoration: underline;
}
.davispedia-feature-card p {
margin: 0;
color: #363636;
line-height: 1.5;
}
}


/* Picture-of-the-day card layout */
.davispedia-feature-red {
.davispedia-feature-red {
display: flex;
flex-direction: column;
min-width: 0;
min-width: 0;
background: #f8d7da;
}
}


.davispedia-potd-entry {
.davispedia-feature-green {
background: #d8eedc;
}
 
.davispedia-feature-yellow {
background: #fff1bf;
}
 
.davispedia-feature-blue {
background: #d7e9f7;
}
 
.davispedia-feature-red .davispedia-potd-entry {
display: flex;
display: flex;
flex: 1;
flex: 1;
Line 24: Line 70:
}
}


.davispedia-potd-credit {
.davispedia-feature-red .davispedia-potd-caption {
margin-bottom: 1rem;
margin: 0 0 0.6rem;
line-height: 1.45;
}
 
.davispedia-feature-red .davispedia-potd-credit {
margin: 0 0 0.9rem;
font-size: 0.85rem;
line-height: 1.4;
color: #54595d;
}
 
.davispedia-feature-red .davispedia-potd-credit a {
color: inherit;
}
}


.davispedia-potd-image {
.davispedia-feature-red .davispedia-potd-image {
display: flex;
display: flex;
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
box-sizing: border-box;
box-sizing: border-box;
width: 100%;
width: 100%;
height: 260px;
height: 260px;
min-height: 260px;
margin-top: auto;
margin-top: auto;
padding: 0;
overflow: hidden;
overflow: hidden;
 
border: 1px solid rgba(0, 0, 0, 0.08);
border-radius: 8px;
border-radius: 8px;
background: rgba(255, 255, 255, 0.32);
background: rgba(255, 255, 255, 0.34);
}
}


.davispedia-potd-image p,
.davispedia-feature-red .davispedia-potd-image > a,
.davispedia-potd-image figure,
.davispedia-feature-red .davispedia-potd-image > span,
.davispedia-potd-image span,
.davispedia-feature-red .davispedia-potd-image > p,
.davispedia-potd-image a {
.davispedia-feature-red .davispedia-potd-image > figure {
display: flex;
display: flex;
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
box-sizing: border-box;
box-sizing: border-box;
width: 100%;
width: 100%;
Line 59: Line 115:
margin: 0;
margin: 0;
padding: 0;
padding: 0;
}
.davispedia-feature-red .davispedia-potd-image a {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
max-width: 100%;
max-height: 100%;
}
}


Line 64: Line 130:
.davispedia-feature-red .davispedia-potd-image .mw-file-element {
.davispedia-feature-red .davispedia-potd-image .mw-file-element {
display: block;
display: block;
box-sizing: border-box;
width: 100%;
width: 100%;
height: 100%;
height: 100%;
Line 69: Line 136:
max-height: 100%;
max-height: 100%;
margin: 0;
margin: 0;
object-fit: contain;
object-fit: contain;
object-position: center;
object-position: center;
border-radius: 8px;
border: 0;
border-radius: 7px;
}
 
.davispedia-feature-red .davispedia-potd-image .thumb,
.davispedia-feature-red .davispedia-potd-image .thumbinner,
.davispedia-feature-red .davispedia-potd-image .mw-file-description {
max-width: 100%;
margin: 0;
padding: 0;
border: 0;
background: transparent;
}
 
.davispedia-potd-error {
box-sizing: border-box;
margin-top: 0.5rem;
padding: 0.75rem;
border: 1px solid rgba(120, 0, 0, 0.2);
border-radius: 6px;
background: rgba(255, 255, 255, 0.35);
color: #6b0000;
}
}


Line 81: Line 168:
}
}


.davispedia-potd-image {
.davispedia-feature-card {
height: auto;
padding: 1.2rem;
}
 
.davispedia-feature-red .davispedia-potd-image {
height: 220px;
height: 220px;
min-height: 220px;
}
}
}
}

Revision as of 06:23, 29 September 2026

.davispedia-feature-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-auto-rows: 1fr;
	align-items: stretch;
	gap: 1rem;
	margin: 1.5rem 0;
}

.davispedia-feature-card {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	min-width: 0;
	height: 100%;
	min-height: 160px;
	padding: 1.4rem 1.5rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 12px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.davispedia-feature-card h2 {
	margin: 0 0 0.65rem;
	padding: 0;
	border: 0;
	font-size: 1.35rem;
	line-height: 1.25;
}

.davispedia-feature-card h2 a {
	color: #202122;
	text-decoration: none;
}

.davispedia-feature-card h2 a:hover,
.davispedia-feature-card h2 a:focus {
	text-decoration: underline;
}

.davispedia-feature-card p {
	margin: 0;
	color: #363636;
	line-height: 1.5;
}

.davispedia-feature-red {
	min-width: 0;
	background: #f8d7da;
}

.davispedia-feature-green {
	background: #d8eedc;
}

.davispedia-feature-yellow {
	background: #fff1bf;
}

.davispedia-feature-blue {
	background: #d7e9f7;
}

.davispedia-feature-red .davispedia-potd-entry {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
}

.davispedia-feature-red .davispedia-potd-caption {
	margin: 0 0 0.6rem;
	line-height: 1.45;
}

.davispedia-feature-red .davispedia-potd-credit {
	margin: 0 0 0.9rem;
	font-size: 0.85rem;
	line-height: 1.4;
	color: #54595d;
}

.davispedia-feature-red .davispedia-potd-credit a {
	color: inherit;
}

.davispedia-feature-red .davispedia-potd-image {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	height: 260px;
	min-height: 260px;
	margin-top: auto;
	overflow: hidden;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.34);
}

.davispedia-feature-red .davispedia-potd-image > a,
.davispedia-feature-red .davispedia-potd-image > span,
.davispedia-feature-red .davispedia-potd-image > p,
.davispedia-feature-red .davispedia-potd-image > figure {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
	padding: 0;
}

.davispedia-feature-red .davispedia-potd-image a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
}

.davispedia-feature-red .davispedia-potd-image img,
.davispedia-feature-red .davispedia-potd-image .mw-file-element {
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
	object-fit: contain;
	object-position: center;
	border: 0;
	border-radius: 7px;
}

.davispedia-feature-red .davispedia-potd-image .thumb,
.davispedia-feature-red .davispedia-potd-image .thumbinner,
.davispedia-feature-red .davispedia-potd-image .mw-file-description {
	max-width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
}

.davispedia-potd-error {
	box-sizing: border-box;
	margin-top: 0.5rem;
	padding: 0.75rem;
	border: 1px solid rgba(120, 0, 0, 0.2);
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.35);
	color: #6b0000;
}

@media screen and (max-width: 700px) {
	.davispedia-feature-grid {
		grid-template-columns: 1fr;
		grid-auto-rows: auto;
	}

	.davispedia-feature-card {
		height: auto;
		padding: 1.2rem;
	}

	.davispedia-feature-red .davispedia-potd-image {
		height: 220px;
		min-height: 220px;
	}
}