MediaWiki:Common.css: Difference between revisions

From davispedia
Jump to navigation Jump to search
Created page with "→CSS placed here will be applied to all skins: .davispedia-feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0; } .davispedia-feature-card { box-sizing: border-box; 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..."
 
No edit summary
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
@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));
}
gap: 1rem;
margin: 1.5rem 0;
}
}


.davispedia-feature-card {
.davispedia-feature-card {
box-sizing: border-box;
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 {
/* Picture-of-the-day card layout */
margin: 0 0 0.65rem;
.davispedia-feature-red {
padding: 0;
display: flex;
border: 0;
flex-direction: column;
font-size: 1.35rem;
min-width: 0;
}
}


.davispedia-feature-card h2 a {
.davispedia-potd-entry {
color: #202122;
display: flex;
text-decoration: none;
flex: 1;
flex-direction: column;
min-width: 0;
min-height: 0;
}
}


.davispedia-feature-card h2 a:hover {
.davispedia-potd-credit {
text-decoration: underline;
margin-bottom: 1rem;
}
}


.davispedia-feature-card p {
.davispedia-potd-image {
margin: 0;
display: flex;
color: #363636;
align-items: center;
line-height: 1.5;
justify-content: center;
 
box-sizing: border-box;
width: 100%;
height: 260px;
margin-top: auto;
padding: 0;
overflow: hidden;
 
border-radius: 8px;
background: rgba(255, 255, 255, 0.32);
}
}


/* Pastel card colors */
.davispedia-potd-image p,
.davispedia-feature-red {
.davispedia-potd-image figure,
background: #f8d7da;
.davispedia-potd-image span,
}
.davispedia-potd-image a {
display: flex;
align-items: center;
justify-content: center;


.davispedia-feature-green {
box-sizing: border-box;
background: #d8eedc;
width: 100%;
height: 100%;
max-width: 100%;
max-height: 100%;
margin: 0;
padding: 0;
}
}


.davispedia-feature-yellow {
.davispedia-feature-red .davispedia-potd-image img,
background: #fff1bf;
.davispedia-feature-red .davispedia-potd-image .mw-file-element {
}
display: block;
width: 100%;
height: 100%;
max-width: 100%;
max-height: 100%;
margin: 0;


.davispedia-feature-blue {
object-fit: contain;
background: #d7e9f7;
object-position: center;
border-radius: 8px;
}
}


/* Stack the cards on phones */
@media screen and (max-width: 700px) {
@media screen and (max-width: 700px) {
.davispedia-feature-grid {
.davispedia-feature-grid {
grid-template-columns: 1fr;
grid-template-columns: 1fr;
grid-auto-rows: auto;
}
.davispedia-potd-image {
height: 220px;
}
}
}
}

Revision as of 06:18, 29 September 2026

@media screen and (min-width: 701px) {
	.davispedia-feature-grid {
		grid-auto-rows: 1fr;
	}
}

.davispedia-feature-card {
	height: 100%;
}

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

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

.davispedia-potd-credit {
	margin-bottom: 1rem;
}

.davispedia-potd-image {
	display: flex;
	align-items: center;
	justify-content: center;

	box-sizing: border-box;
	width: 100%;
	height: 260px;
	margin-top: auto;
	padding: 0;
	overflow: hidden;

	border-radius: 8px;
	background: rgba(255, 255, 255, 0.32);
}

.davispedia-potd-image p,
.davispedia-potd-image figure,
.davispedia-potd-image span,
.davispedia-potd-image a {
	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 img,
.davispedia-feature-red .davispedia-potd-image .mw-file-element {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	margin: 0;

	object-fit: contain;
	object-position: center;
	border-radius: 8px;
}

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

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