Module:Navbox timeline/styles.css: Difference between revisions
Appearance
AZMindroma (talk | contribs) No edit summary |
AZMindroma (talk | contribs) No edit summary |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 3: | Line 3: | ||
border-collapse: collapse; | border-collapse: collapse; | ||
table-layout: fixed; | table-layout: fixed; | ||
max-width: 100%; | |||
} | } | ||
.timeline-wrapper-cell { | .timeline-wrapper-cell { | ||
padding: 0; | padding: 0; | ||
overflow: auto; | overflow-x: auto; | ||
overflow-y: visible; | |||
width: 100%; | |||
max-width: 100%; | |||
box-sizing: border-box; | |||
} | } | ||
.timeline-table { | .timeline-table { | ||
width: | width: auto; | ||
min-width: 800px; | |||
border-collapse: collapse; | border-collapse: collapse; | ||
text-align: center; | text-align: center; | ||
white-space: nowrap; | |||
table-layout: auto; | |||
} | |||
.navbox.timeline-container { | |||
max-width: 100%; | |||
overflow: hidden; | |||
} | |||
.navbox .timeline-wrapper { | |||
max-width: 100%; | |||
} | |||
.navbox .timeline-wrapper-cell { | |||
max-width: 100%; | |||
overflow-x: auto; | |||
display: block; | |||
} | } | ||
| Line 35: | Line 58: | ||
color: inherit; | color: inherit; | ||
font-weight: normal; | font-weight: normal; | ||
min-width: 50px; | |||
padding: 0.2em 0.25em; | |||
} | } | ||
/* | .timeline-decade { | ||
min-width: 80px; | |||
font-weight: bold; | |||
background-color: #E8E8E8; | |||
} | |||
/* Ultra-compact month styling */ | |||
.timeline-month { | .timeline-month { | ||
background-color: #F8F8F8; | background-color: #F8F8F8; | ||
color: inherit; | color: inherit; | ||
font-weight: normal; | font-weight: normal; | ||
font-size: 0. | font-size: 0.7em; /* Smaller font */ | ||
padding: 0 0.1em; | padding: 0.1em 0.1em; /* Minimal padding */ | ||
border-left: 1px solid #E0E0E0; | border-left: 1px solid #E0E0E0; | ||
min-width: 18px; /* Very compact width */ | |||
max-width: 20px; /* Prevent expansion */ | |||
width: 18px; /* Fixed width */ | |||
line-height: 1; /* Compact line height */ | |||
} | } | ||
| Line 56: | Line 91: | ||
padding: 0 1em; | padding: 0 1em; | ||
vertical-align: middle; | vertical-align: middle; | ||
min-width: 100px; | |||
} | } | ||
| Line 61: | Line 97: | ||
background-color: #E0E0E0; | background-color: #E0E0E0; | ||
color: inherit; | color: inherit; | ||
} | } | ||
| Line 68: | Line 103: | ||
color: inherit; | color: inherit; | ||
font-weight: bold; | font-weight: bold; | ||
vertical-align: middle; | vertical-align: middle; | ||
font-size: 0.9em; | |||
min-width: 40px; | |||
. | |||
padding: 0.2em 0.25em; | padding: 0.2em 0.25em; | ||
word-wrap: break-word; | |||
overflow-wrap: break-word; | |||
} | } | ||
.timeline-item:hover { | .timeline-item:hover { | ||
background-color: #B0B0B0; | background-color: #B0B0B0; | ||
cursor: pointer; | cursor: pointer; | ||
} | |||
/* Dark mode support */ | |||
@media screen { | |||
html.skin-theme-clientpref-night .timeline-row > * { | |||
border-color: #202122; | |||
} | |||
html.skin-theme-clientpref-night .timeline-decade { | |||
background-color: #34495e; | |||
color: #eaecf0; | |||
} | |||
html.skin-theme-clientpref-night .timeline-year { | |||
background-color: #2c3544; | |||
color: #eaecf0; | |||
} | |||
html.skin-theme-clientpref-night .timeline-month { | |||
background-color: #27292d; | |||
color: #eaecf0; | |||
border-left-color: #404040; | |||
} | |||
html.skin-theme-clientpref-night .timeline-blank { | |||
background-color: #3a3a3a; | |||
color: #eaecf0; | |||
} | |||
html.skin-theme-clientpref-night .timeline-item { | |||
background-color: #4a5568; | |||
color: #eaecf0; | |||
} | |||
html.skin-theme-clientpref-night .timeline-item:hover { | |||
background-color: #5a6678; | |||
} | |||
html.skin-theme-clientpref-night .timeline-label { | |||
color: #eaecf0; | |||
} | |||
} | |||
@media screen and (prefers-color-scheme: dark) { | |||
html.skin-theme-clientpref-os .timeline-row > * { | |||
border-color: #202122; | |||
} | |||
html.skin-theme-clientpref-os .timeline-decade { | |||
background-color: #34495e; | |||
color: #eaecf0; | |||
} | |||
html.skin-theme-clientpref-os .timeline-year { | |||
background-color: #2c3544; | |||
color: #eaecf0; | |||
} | |||
html.skin-theme-clientpref-os .timeline-month { | |||
background-color: #27292d; | |||
color: #eaecf0; | |||
border-left-color: #404040; | |||
} | |||
html.skin-theme-clientpref-os .timeline-blank { | |||
background-color: #3a3a3a; | |||
color: #eaecf0; | |||
} | |||
html.skin-theme-clientpref-os .timeline-item { | |||
background-color: #4a5568; | |||
color: #eaecf0; | |||
} | |||
html.skin-theme-clientpref-os .timeline-item:hover { | |||
background-color: #5a6678; | |||
} | |||
html.skin-theme-clientpref-os .timeline-label { | |||
color: #eaecf0; | |||
} | |||
} | } | ||
/* Responsive adjustments */ | /* Responsive adjustments */ | ||
@media (max-width: 768px) { | @media (max-width: 768px) { | ||
.timeline-table { | |||
min-width: 600px; | |||
} | |||
.timeline-month { | .timeline-month { | ||
font-size: 0. | font-size: 0.65em; /* Even smaller on mobile */ | ||
padding: 0 0.05em; | padding: 0.05em 0.05em; /* Minimal padding */ | ||
min-width: 16px; /* Smaller minimum */ | |||
max-width: 16px; | |||
width: 16px; | |||
} | } | ||
| Line 96: | Line 216: | ||
padding: 0.1em 0.15em; | padding: 0.1em 0.15em; | ||
font-size: 0.9em; | font-size: 0.9em; | ||
} | |||
.timeline-year { | |||
min-width: 40px; | |||
} | |||
.timeline-decade { | |||
min-width: 60px; | |||
} | |||
.timeline-label { | |||
min-width: 80px; | |||
} | } | ||
} | } | ||
/* | /* Additional compactness for months */ | ||
@media (max-width: 480px) { | |||
.timeline-month { | |||
font-size: 0.6em; | |||
padding: 0.05em; | |||
min-width: 14px; | |||
max-width: 14px; | |||
width: 14px; | |||
.timeline- | } | ||
. | |||
} | |||
} | } | ||
Latest revision as of 19:16, 15 October 2025
.timeline-wrapper {
width: 100%;
border-collapse: collapse;
table-layout: fixed;
max-width: 100%;
}
.timeline-wrapper-cell {
padding: 0;
overflow-x: auto;
overflow-y: visible;
width: 100%;
max-width: 100%;
box-sizing: border-box;
}
.timeline-table {
width: auto;
min-width: 800px;
border-collapse: collapse;
text-align: center;
white-space: nowrap;
table-layout: auto;
}
.navbox.timeline-container {
max-width: 100%;
overflow: hidden;
}
.navbox .timeline-wrapper {
max-width: 100%;
}
.navbox .timeline-wrapper-cell {
max-width: 100%;
overflow-x: auto;
display: block;
}
.timeline-row > * {
border-style: solid;
border-color: #FDFDFD;
border-width: 2px 2px 0 0;
}
.timeline-row:first-child > * {
border-top-width: 0;
}
.timeline-row > :last-child {
border-right-width: 0;
}
.timeline-decade,
.timeline-year {
background-color: #F0F0F0;
color: inherit;
font-weight: normal;
min-width: 50px;
padding: 0.2em 0.25em;
}
.timeline-decade {
min-width: 80px;
font-weight: bold;
background-color: #E8E8E8;
}
/* Ultra-compact month styling */
.timeline-month {
background-color: #F8F8F8;
color: inherit;
font-weight: normal;
font-size: 0.7em; /* Smaller font */
padding: 0.1em 0.1em; /* Minimal padding */
border-left: 1px solid #E0E0E0;
min-width: 18px; /* Very compact width */
max-width: 20px; /* Prevent expansion */
width: 18px; /* Fixed width */
line-height: 1; /* Compact line height */
}
.timeline-month:first-child {
border-left: none;
}
.timeline-label {
text-align: center;
font-weight: normal;
padding: 0 1em;
vertical-align: middle;
min-width: 100px;
}
.timeline-blank {
background-color: #E0E0E0;
color: inherit;
}
.timeline-item {
background-color: #C0C0C0;
color: inherit;
font-weight: bold;
vertical-align: middle;
font-size: 0.9em;
min-width: 40px;
padding: 0.2em 0.25em;
word-wrap: break-word;
overflow-wrap: break-word;
}
.timeline-item:hover {
background-color: #B0B0B0;
cursor: pointer;
}
/* Dark mode support */
@media screen {
html.skin-theme-clientpref-night .timeline-row > * {
border-color: #202122;
}
html.skin-theme-clientpref-night .timeline-decade {
background-color: #34495e;
color: #eaecf0;
}
html.skin-theme-clientpref-night .timeline-year {
background-color: #2c3544;
color: #eaecf0;
}
html.skin-theme-clientpref-night .timeline-month {
background-color: #27292d;
color: #eaecf0;
border-left-color: #404040;
}
html.skin-theme-clientpref-night .timeline-blank {
background-color: #3a3a3a;
color: #eaecf0;
}
html.skin-theme-clientpref-night .timeline-item {
background-color: #4a5568;
color: #eaecf0;
}
html.skin-theme-clientpref-night .timeline-item:hover {
background-color: #5a6678;
}
html.skin-theme-clientpref-night .timeline-label {
color: #eaecf0;
}
}
@media screen and (prefers-color-scheme: dark) {
html.skin-theme-clientpref-os .timeline-row > * {
border-color: #202122;
}
html.skin-theme-clientpref-os .timeline-decade {
background-color: #34495e;
color: #eaecf0;
}
html.skin-theme-clientpref-os .timeline-year {
background-color: #2c3544;
color: #eaecf0;
}
html.skin-theme-clientpref-os .timeline-month {
background-color: #27292d;
color: #eaecf0;
border-left-color: #404040;
}
html.skin-theme-clientpref-os .timeline-blank {
background-color: #3a3a3a;
color: #eaecf0;
}
html.skin-theme-clientpref-os .timeline-item {
background-color: #4a5568;
color: #eaecf0;
}
html.skin-theme-clientpref-os .timeline-item:hover {
background-color: #5a6678;
}
html.skin-theme-clientpref-os .timeline-label {
color: #eaecf0;
}
}
/* Responsive adjustments */
@media (max-width: 768px) {
.timeline-table {
min-width: 600px;
}
.timeline-month {
font-size: 0.65em; /* Even smaller on mobile */
padding: 0.05em 0.05em; /* Minimal padding */
min-width: 16px; /* Smaller minimum */
max-width: 16px;
width: 16px;
}
.timeline-decade,
.timeline-year,
.timeline-item {
padding: 0.1em 0.15em;
font-size: 0.9em;
}
.timeline-year {
min-width: 40px;
}
.timeline-decade {
min-width: 60px;
}
.timeline-label {
min-width: 80px;
}
}
/* Additional compactness for months */
@media (max-width: 480px) {
.timeline-month {
font-size: 0.6em;
padding: 0.05em;
min-width: 14px;
max-width: 14px;
width: 14px;
}
}