MediaWiki:Common.css: Difference between revisions
Jump to navigation
Jump to search
Ttswikiadmin (talk | contribs) (Created page with "→CSS placed here will be applied to all skins: .portal-column-left { float: left; width: 100%; } .portal-column-right { float: right; width: 100%; } →Two column layout on wider screens: @media (min-width: 720px) { .portal-column-left { width: 48%; margin-right: 2%; } .portal-column-right { width: 48%; margin-left: 2%; } }") |
Ttswikiadmin (talk | contribs) No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 21: | Line 21: | ||
width: 48%; | width: 48%; | ||
margin-left: 2%; | margin-left: 2%; | ||
} | |||
} | |||
/*infobox*/ | |||
/* Base infobox styling */ | |||
.infobox { | |||
border: 1px solid #a2a9b1; | |||
border-spacing: 3px; | |||
background-color: #f8f9fa; | |||
color: black; | |||
margin: 0.5em 0 0.5em 1em; | |||
padding: 0.2em; | |||
float: right; | |||
clear: right; | |||
font-size: 88%; | |||
line-height: 1.5em; | |||
width: 22em; | |||
box-sizing: border-box; | |||
} | |||
.infobox th { | |||
background-color: #eaecf0; | |||
text-align: center; | |||
font-weight: bold; | |||
padding: 4px 8px; | |||
} | |||
.infobox td { | |||
padding: 4px 8px; | |||
word-wrap: break-word; | |||
overflow-wrap: break-word; | |||
} | |||
/* TTS-specific styling */ | |||
.tts-infobox { | |||
max-width: 100%; | |||
} | |||
/* Mobile responsiveness */ | |||
@media screen and (max-width: 640px) { | |||
.infobox { | |||
float: none !important; | |||
margin: 1em 0 !important; | |||
width: 100% !important; | |||
max-width: none !important; | |||
box-sizing: border-box; | |||
} | |||
.tts-infobox { | |||
width: 100% !important; | |||
margin-left: 0 !important; | |||
margin-right: 0 !important; | |||
} | |||
.infobox th, | |||
.infobox td { | |||
font-size: 14px; | |||
padding: 6px 8px; | |||
} | |||
/* Make links more touch-friendly on mobile */ | |||
.infobox a { | |||
min-height: 44px; | |||
display: inline-block; | |||
line-height: 1.4; | |||
} | |||
} | |||
/* Tablet responsiveness */ | |||
@media screen and (max-width: 900px) and (min-width: 641px) { | |||
.infobox { | |||
width: 18em; | |||
font-size: 85%; | |||
} | |||
} | |||
/* Very small screens */ | |||
@media screen and (max-width: 480px) { | |||
.infobox { | |||
font-size: 90% !important; | |||
} | |||
.infobox th { | |||
font-size: 110% !important; | |||
} | |||
/* Stack label and value on very small screens */ | |||
.infobox tr td:first-child { | |||
display: block; | |||
width: 100%; | |||
font-weight: bold; | |||
border-bottom: none; | |||
padding-bottom: 2px; | |||
} | |||
.infobox tr td:last-child { | |||
display: block; | |||
width: 100%; | |||
padding-top: 2px; | |||
padding-left: 12px; | |||
} | |||
} | |||
/* High DPI displays */ | |||
@media screen and (-webkit-min-device-pixel-ratio: 2), | |||
screen and (min-resolution: 192dpi) { | |||
.infobox { | |||
border-width: 0.5px; | |||
} | |||
} | |||
/* Print styles */ | |||
@media print { | |||
.infobox { | |||
float: none !important; | |||
width: 100% !important; | |||
margin: 1em 0 !important; | |||
page-break-inside: avoid; | |||
} | |||
} | |||
/* Dark mode support (optional) */ | |||
@media (prefers-color-scheme: dark) { | |||
.infobox { | |||
background-color: #2a2a2a; | |||
color: #e6e6e6; | |||
border-color: #555; | |||
} | |||
.infobox th { | |||
background-color: #404040; | |||
color: #e6e6e6; | |||
} | } | ||
} | } | ||
Latest revision as of 16:07, 20 September 2025
/* CSS placed here will be applied to all skins */
.portal-column-left {
float: left;
width: 100%;
}
.portal-column-right {
float: right;
width: 100%;
}
/* Two column layout on wider screens */
@media (min-width: 720px) {
.portal-column-left {
width: 48%;
margin-right: 2%;
}
.portal-column-right {
width: 48%;
margin-left: 2%;
}
}
/*infobox*/
/* Base infobox styling */
.infobox {
border: 1px solid #a2a9b1;
border-spacing: 3px;
background-color: #f8f9fa;
color: black;
margin: 0.5em 0 0.5em 1em;
padding: 0.2em;
float: right;
clear: right;
font-size: 88%;
line-height: 1.5em;
width: 22em;
box-sizing: border-box;
}
.infobox th {
background-color: #eaecf0;
text-align: center;
font-weight: bold;
padding: 4px 8px;
}
.infobox td {
padding: 4px 8px;
word-wrap: break-word;
overflow-wrap: break-word;
}
/* TTS-specific styling */
.tts-infobox {
max-width: 100%;
}
/* Mobile responsiveness */
@media screen and (max-width: 640px) {
.infobox {
float: none !important;
margin: 1em 0 !important;
width: 100% !important;
max-width: none !important;
box-sizing: border-box;
}
.tts-infobox {
width: 100% !important;
margin-left: 0 !important;
margin-right: 0 !important;
}
.infobox th,
.infobox td {
font-size: 14px;
padding: 6px 8px;
}
/* Make links more touch-friendly on mobile */
.infobox a {
min-height: 44px;
display: inline-block;
line-height: 1.4;
}
}
/* Tablet responsiveness */
@media screen and (max-width: 900px) and (min-width: 641px) {
.infobox {
width: 18em;
font-size: 85%;
}
}
/* Very small screens */
@media screen and (max-width: 480px) {
.infobox {
font-size: 90% !important;
}
.infobox th {
font-size: 110% !important;
}
/* Stack label and value on very small screens */
.infobox tr td:first-child {
display: block;
width: 100%;
font-weight: bold;
border-bottom: none;
padding-bottom: 2px;
}
.infobox tr td:last-child {
display: block;
width: 100%;
padding-top: 2px;
padding-left: 12px;
}
}
/* High DPI displays */
@media screen and (-webkit-min-device-pixel-ratio: 2),
screen and (min-resolution: 192dpi) {
.infobox {
border-width: 0.5px;
}
}
/* Print styles */
@media print {
.infobox {
float: none !important;
width: 100% !important;
margin: 1em 0 !important;
page-break-inside: avoid;
}
}
/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
.infobox {
background-color: #2a2a2a;
color: #e6e6e6;
border-color: #555;
}
.infobox th {
background-color: #404040;
color: #e6e6e6;
}
}