MediaWiki:Mobile.css: Difference between revisions

From Medalist Wiki
No edit summary
No edit summary
Tags: Mobile edit Mobile web edit
 
Line 1: Line 1:
/* All CSS here will be loaded for users of the mobile site */
/* mediawiki:mobile.css */


/* Infobox Styles */
.infobox {
.infobox {
     background: #eee;
     background: #eee;
Line 9: Line 10:
     width: 270px;
     width: 270px;
}
}
.infobox-title {
.infobox-title {
     font-size: 1.8em;
     font-size: 1.8em;
Line 14: Line 16:
     vertical-align: top;
     vertical-align: top;
}
}
.infobox-image {
.infobox-image {
     text-align: center;
     text-align: center;
}
}
.infobox-table th {
.infobox-table th {
     text-align: left;
     text-align: left;
Line 23: Line 27:
     font-size: 0.80em;
     font-size: 0.80em;
}
}
.infobox-table td {
.infobox-table td {
     vertical-align: top;
     vertical-align: top;
     width: 60%;
     width: 60%;
     font-size: 0.90em;
     font-size: 0.90em;
}
/* Reset MobileFrontend's hiding of tables */
.mobile-view table,
.mobile-view tr,
.mobile-view th,
.mobile-view td {
    display: revert !important;
}
}


/* Base navbox styles */
/* Base navbox styles */
.navbox,
.navbox,
.navbox-styles,
.navbox-styles {
.mobile-view .navbox,
.mobile-view .navbox-styles {
     display: block !important;
     display: block !important;
    visibility: visible !important;
     width: 100% !important;
     width: 100% !important;
     margin: 1em 0 !important;
     margin: 1em 0 !important;
     font-size: 88%;
     font-size: 95%; /* Slightly larger for mobile */
     border: 1px solid #aaa;
     border: 1px solid #aaa;
     clear: both;
     clear: both;
Line 46: Line 56:
/* Table structure */
/* Table structure */
.navbox table,
.navbox table,
.navbox-inner table,
.navbox-inner,
.navbox-subgroup table {
.navbox-subgroup {
    display: table !important;
     width: 100% !important;
     width: 100% !important;
    border-collapse: collapse;
     border-spacing: 0;
     border-spacing: 0;
}
}


.navbox tr {
/* Ensure all table elements display properly */
.navbox tr,
.navbox th,
.navbox td {
     display: table-row !important;
     display: table-row !important;
    vertical-align: middle;
}
}


Line 60: Line 74:
.navbox td {
.navbox td {
     display: table-cell !important;
     display: table-cell !important;
     padding: 0.25em !important;
     padding: 0.25em 0.5em !important;
}
}


Line 74: Line 88:
.navbox-list {
.navbox-list {
     text-align: left;
     text-align: left;
     padding: 0.25em !important;
     padding: 0.25em 0.5em !important;
     background: #fdfdfd;
     background: #fdfdfd;
}
}


/* Override any MobileFrontend hiding */
/* Ensure lists display properly */
.navbox *,
.navbox-list ul,
.navbox-styles *,
.navbox-list ol {
.mobile-view .navbox *,
    margin: 0.125em 0;
    padding-left: 1.5em;
}
 
/* Force visibility */
.navbox .mw-collapsible-content {
    display: block !important;
    visibility: visible !important;
}

Latest revision as of 01:21, 10 February 2025

/* mediawiki:mobile.css */

/* Infobox Styles */
.infobox {
    background: #eee;
    border: 1px solid #aaa;
    float: right;
    margin: 0 0 0.5em 0.5em;
    padding: 1em;
    width: 270px;
}

.infobox-title {
    font-size: 1.8em;
    text-align: center;
    vertical-align: top;
}

.infobox-image {
    text-align: center;
}

.infobox-table th {
    text-align: left;
    vertical-align: top;
    width: 40%;
    font-size: 0.80em;
}

.infobox-table td {
    vertical-align: top;
    width: 60%;
    font-size: 0.90em;
}

/* Reset MobileFrontend's hiding of tables */
.mobile-view table,
.mobile-view tr,
.mobile-view th,
.mobile-view td {
    display: revert !important;
}

/* Base navbox styles */
.navbox,
.navbox-styles {
    display: block !important;
    width: 100% !important;
    margin: 1em 0 !important;
    font-size: 95%; /* Slightly larger for mobile */
    border: 1px solid #aaa;
    clear: both;
    box-sizing: border-box;
}

/* Table structure */
.navbox table,
.navbox-inner,
.navbox-subgroup {
    width: 100% !important;
    border-collapse: collapse;
    border-spacing: 0;
}

/* Ensure all table elements display properly */
.navbox tr,
.navbox th,
.navbox td {
    display: table-row !important;
    vertical-align: middle;
}

.navbox th,
.navbox td {
    display: table-cell !important;
    padding: 0.25em 0.5em !important;
}

/* Headers and groups */
.navbox-title,
.navbox-group,
.navbox-abovebelow {
    background: #eaeeff !important;
    text-align: center;
    padding: 0.5em !important;
}

.navbox-list {
    text-align: left;
    padding: 0.25em 0.5em !important;
    background: #fdfdfd;
}

/* Ensure lists display properly */
.navbox-list ul,
.navbox-list ol {
    margin: 0.125em 0;
    padding-left: 1.5em;
}

/* Force visibility */
.navbox .mw-collapsible-content {
    display: block !important;
    visibility: visible !important;
}