MediaWiki:Cards.css: Difference between revisions

From Coral Island Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 4: Line 4:
width: fit-content;
width: fit-content;
align-self: baseline;
align-self: baseline;
text-align: center;
padding: 1px;
}
}
.custom-card-body {
.custom-card-body {
Line 16: Line 18:
}
}
.custom-card-image {
.custom-card-image {
width: 60px;
width: 52px;
height: 60px;
height: 52px;
padding: 4px;
padding: 4px;
}
}
Line 39: Line 41:
overflow-wrap: break-word;
overflow-wrap: break-word;
}
}
.custom-card-caption > br:first-child {
.custom-card-caption > br:first-child {
display: none;
display: none;
Line 45: Line 48:
/* To add quality icon on items */
/* To add quality icon on items */
.custom-card-body.quality-bronze::before {
.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');
content: url('https://coralisland.wiki/w/images/8/8c/Bronze_small.png');
position: absolute;
position: absolute;
z-index: 1;
z-index: 1;
Line 53: Line 56:
}
}
.custom-card-body.quality-silver::before {
.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');
content: url('https://coralisland.wiki/w/images/8/86/Silver_small.png');
position: absolute;
position: absolute;
z-index: 1;
z-index: 1;
Line 61: Line 64:
}
}
.custom-card-body.quality-gold::before {
.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');
content: url('https://coralisland.wiki/w/images/5/56/Gold_small.png');
position: absolute;
position: absolute;
z-index: 1;
z-index: 1;
Line 69: Line 72:
}
}
.custom-card-body.quality-osmium::before {
.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');
content: url('https://coralisland.wiki/w/images/9/94/Osmium_small.png');
position: absolute;
position: absolute;
z-index: 1;
z-index: 1;
Line 82: Line 85:
flex-wrap: wrap;
flex-wrap: wrap;
gap: 5px;
gap: 5px;
}
/* Navbox mini card*/
.navbox-list .mini .custom-card-caption {
max-width: 44px;
overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    -ms-box-orient: vertical;
}
/* Mini Card*/
.mini :is(.custom-card-image, .custom-card-image img) {
width: 36px !important;
height: 36px !important;
}
.mini .custom-card-body {
border-radius: 5px !important;
}
.mini .custom-card-body:before {
top: 2px;
left: 2px;
}
.mini .custom-card-caption {
width: auto;
max-width: 56px;
min-width: 44px;
}
}

Latest revision as of 04:19, 10 February 2024

.custom-card {
	display: inline-block;
	position: relative;
	width: fit-content;
	align-self: baseline;
	text-align: center;
	padding: 1px;
}
.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: 52px;
	height: 52px;
	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://coralisland.wiki/w/images/8/8c/Bronze_small.png');
	position: absolute;
	z-index: 1;
	top: 3px;
	left: 3px;
	display: flex;
}
.custom-card-body.quality-silver::before {
	content: url('https://coralisland.wiki/w/images/8/86/Silver_small.png');
	position: absolute;
	z-index: 1;
	top: 3px;
	left: 3px;
	display: flex;
}
.custom-card-body.quality-gold::before {
	content: url('https://coralisland.wiki/w/images/5/56/Gold_small.png');
	position: absolute;
	z-index: 1;
	top: 3px;
	left: 3px;
	display: flex;
}
.custom-card-body.quality-osmium::before {
	content: url('https://coralisland.wiki/w/images/9/94/Osmium_small.png');
	position: absolute;
	z-index: 1;
	top: 3px;
	left: 3px;
	display: flex;
}

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

/* Navbox mini card*/
.navbox-list .mini .custom-card-caption {
	max-width: 44px;
	overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    -ms-box-orient: vertical;
}

/* Mini Card*/
.mini :is(.custom-card-image, .custom-card-image img) {
	width: 36px !important;
	height: 36px !important;
}
.mini .custom-card-body {
	border-radius: 5px !important;
}
.mini .custom-card-body:before {
	top: 2px;
	left: 2px;
}
.mini .custom-card-caption {
	width: auto;
	max-width: 56px;
	min-width: 44px;
}