Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.css: Difference between revisions

MediaWiki interface page
Created page with "→‎CSS placed here will be applied to all skins: →‎Infobox template style: .infobox { border: 1px solid #a2a9b1; border-spacing: 3px; background-color: #f8f9fa; color: black; →‎@noflip: margin: 0.5em 0 0.5em 1em; padding: 0.2em; →‎@noflip: float: right; →‎@noflip: clear: right; font-size: 88%; line-height: 1.5em; width: 22em; } .infobox-header, .infobox-label, .infobox-above, .infobox-full-data, .infobox-data, .infobox-below, .infobox-subhead..."
 
No edit summary
 
(27 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
.card-grid {
/* Infobox template style */
    display: flex;
.infobox {
    flex-wrap: wrap;
border: 1px solid #a2a9b1;
    gap: 1em;
border-spacing: 3px;
    justify-content: space-between;
background-color: #f8f9fa;
    margin: 0 auto;
color: black;
    padding: 1em;
/* @noflip */
    max-width: 1200px; /* Center the grid on larger screens */
margin: 0.5em 0 0.5em 1em;
padding: 0.2em;
/* @noflip */
float: right;
/* @noflip */
clear: right;
font-size: 88%;
line-height: 1.5em;
width: 22em;
}
}


.infobox-header,
.card {
.infobox-label,
    flex: 1 1 calc(33.333% - 1em); /* 3 columns with spacing */
.infobox-above,
    box-sizing: border-box;
.infobox-full-data,
    border: 2px solid var(--ooui-border-color-base); /* Theme-adaptive border */
.infobox-data,
    border-radius: 8px; /* Rounded corners */
.infobox-below,
    padding: 1em; /* Add padding inside the card */
.infobox-subheader,
    background-color: var(--ooui-background-color-base); /* Theme-adaptive background */
.infobox-image,
    color: var(--ooui-text-color); /* Theme-adaptive text color */
.infobox-navbar,
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Soft shadow */
/* Remove element selector when every .infobox thing is using the standard module/templates  */
    transition: transform 0.3s, box-shadow 0.3s; /* Smooth hover effects */
.infobox th,
    display: flex;
.infobox td {
    flex-direction: column;
vertical-align: top;
    justify-content: space-between;
}
}


.infobox-label,
.card:hover {
.infobox-data,
    transform: translateY(-5px); /* Slight lift on hover */
/* Remove element selector when every .infobox thing is using the standard module/templates  */
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15); /* Slightly stronger shadow */
.infobox th,
    border-color: var(--ooui-border-color-progressive); /* Theme-adaptive hover border */
.infobox td {
/* @noflip */
text-align: left;
}
}


/* Remove .infobox when element selectors above are removed */
.card h3 {
.infobox .infobox-above,
    text-align: center;
.infobox .infobox-title,
    font-size: 1.5em;
/* Remove element selector when every .infobox thing is using the standard module/templates  */
    margin: 0.5em 0;
.infobox caption {
font-size: 125%;
font-weight: bold;
text-align: center;
}
}


.infobox-title,
.card p {
/* Remove element selector when every .infobox thing is using the standard module/templates  */
    font-size: 1em;
.infobox caption {
    text-align: center;
padding: 0.2em;
    margin: 0.5em 0;
}
}


/* Remove .infobox when element selectors above are removed */
.card .card-image-container {
.infobox .infobox-header,
    display: flex;
.infobox .infobox-subheader,
    justify-content: center;
.infobox .infobox-image,
    margin-bottom: 1em;
.infobox .infobox-full-data,
.infobox .infobox-below {
text-align: center;
}
}


/* Remove .infobox when element selectors above are removed */
.card .card-view-button-container {
.infobox .infobox-navbar {
    display: flex;
/* @noflip */
    justify-content: space-between;
text-align: right;
    margin-top: auto;
}
 
.card .card-view-button-container .left {
    text-align: left;
}
 
.card .card-view-button-container .right {
    text-align: right;
}
 
.card img {
    display: block;
    max-width: 100%;
    height: auto;
}
 
/* Adjust for tablets */
@media (max-width: 768px) {
    .card {
        flex: 1 1 calc(50% - 1em); /* 2 columns */
    }
}
 
/* Adjust for mobile */
@media (max-width: 480px) {
    .card {
        flex: 1 1 100%; /* 1 column */
    }
}
 
/* To make images responsive */
.res-img img {
max-width:100%;
height:auto;
}
 
.icon-minecraft, .icon-minecraft-sm {
background-image: url("https://www.prismparty.net/hosted/images/items/icons-minecraft.webp");
}
}

Latest revision as of 13:03, 20 December 2024

.card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    justify-content: space-between;
    margin: 0 auto;
    padding: 1em;
    max-width: 1200px; /* Center the grid on larger screens */
}

.card {
    flex: 1 1 calc(33.333% - 1em); /* 3 columns with spacing */
    box-sizing: border-box;
    border: 2px solid var(--ooui-border-color-base); /* Theme-adaptive border */
    border-radius: 8px; /* Rounded corners */
    padding: 1em; /* Add padding inside the card */
    background-color: var(--ooui-background-color-base); /* Theme-adaptive background */
    color: var(--ooui-text-color); /* Theme-adaptive text color */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Soft shadow */
    transition: transform 0.3s, box-shadow 0.3s; /* Smooth hover effects */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-5px); /* Slight lift on hover */
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15); /* Slightly stronger shadow */
    border-color: var(--ooui-border-color-progressive); /* Theme-adaptive hover border */
}

.card h3 {
    text-align: center;
    font-size: 1.5em;
    margin: 0.5em 0;
}

.card p {
    font-size: 1em;
    text-align: center;
    margin: 0.5em 0;
}

.card .card-image-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1em;
}

.card .card-view-button-container {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
}

.card .card-view-button-container .left {
    text-align: left;
}

.card .card-view-button-container .right {
    text-align: right;
}

.card img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Adjust for tablets */
@media (max-width: 768px) {
    .card {
        flex: 1 1 calc(50% - 1em); /* 2 columns */
    }
}

/* Adjust for mobile */
@media (max-width: 480px) {
    .card {
        flex: 1 1 100%; /* 1 column */
    }
}

/* To make images responsive */
.res-img img {
	max-width:100%;
	height:auto;
}

.icon-minecraft, .icon-minecraft-sm {
	background-image: url("https://www.prismparty.net/hosted/images/items/icons-minecraft.webp");
}