MediaWiki:Cards.css: Difference between revisions

From Coral Island Wiki
Jump to navigation Jump to search
(Created page with ".custom-card { display: inline-block; position: relative; width: fit-content; align-self: baseline; } .custom-card-body { display: inline-block; position: relative; width: fit-content; align-self: baseline; background: var(--card-bg-main); border-radius: 12px; text-align: center; overflow: hidden; } .custom-card-image { width: 60px; height: 60px; padding: 4px; } .custom-card-amount { background: var(--card-bg-sub); text-align: center; border-radius: 0 0...")
 
No edit summary
Line 10: Line 10:
width: fit-content;
width: fit-content;
align-self: baseline;
align-self: baseline;
background: var(--card-bg-main);
background: var(--brown-100);
border-radius: 12px;
border-radius: 12px;
text-align: center;
text-align: center;
Line 21: Line 21:
}
}
.custom-card-amount {
.custom-card-amount {
background: var(--card-bg-sub);
background: var(--brown-200);
text-align: center;
text-align: center;
border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;

Revision as of 10:01, 13 January 2024

.custom-card {
	display: inline-block;
	position: relative;
	width: fit-content;
	align-self: baseline;
}
.custom-card-body {
	display: inline-block;
	position: relative;
	width: fit-content;
	align-self: baseline;
	background: var(--brown-100);
	border-radius: 12px;
	text-align: center;
	overflow: hidden;
}
.custom-card-image {
	width: 60px;
	height: 60px;
	padding: 4px;
}
.custom-card-amount {
	background: var(--brown-200);
	text-align: center;
	border-radius: 0 0 5px 5px;
	padding: 4px 0;
	white-space: nowrap;
	line-height: 1;
	font-size: 12px;
	hyphens: auto;
	overflow-wrap: break-word;
}
.custom-card-caption {
	width: 56px;
	text-align: center;
	line-height: 1;
	font-size: 12px;
	hyphens: auto;
	overflow-wrap: break-word;
}
.custom-card-caption > br:first-child {
	display: none;
}

/* To add quality icon on items */
.custom-card-body.quality-bronze::before {
	content: url('https://static.wikia.nocookie.net/coralisland/images/f/f2/Bronze.png/revision/latest/scale-to-width-down/15');
	position: absolute;
	z-index: 1;
	top: 3px;
	left: 3px;
	display: flex;
}
.custom-card-body.quality-silver::before {
	content: url('https://static.wikia.nocookie.net/coralisland/images/0/0b/Silver.png/revision/latest/scale-to-width-down/15');
	position: absolute;
	z-index: 1;
	top: 3px;
	left: 3px;
	display: flex;
}
.custom-card-body.quality-gold::before {
	content: url('https://static.wikia.nocookie.net/coralisland/images/1/10/Gold.png/revision/latest/scale-to-width-down/15');
	position: absolute;
	z-index: 1;
	top: 3px;
	left: 3px;
	display: flex;
}
.custom-card-body.quality-osmium::before {
	content: url('https://static.wikia.nocookie.net/coralisland/images/f/f9/Osmium.png/revision/latest/scale-to-width-down/15');
	position: absolute;
	z-index: 1;
	top: 3px;
	left: 3px;
	display: flex;
}

/* Card list */
.card-list-container {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}