MediaWiki:Common.css
From Seven Sages of Rome
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/* CSS placed here will be applied to all skins */
#mw-navigation {
z-index: 999;
border-bottom: 1px solid #e7e7e7;
background-color: rgba(255, 255, 255, 0.2) !important;
backdrop-filter: blur(20px) saturate(160%) contrast(45%) brightness(140%) !important;
-webkit-backdrop-filter: blur(20px) saturate(160%) contrast(45%) brightness(140%);
}
.nav-link {
color: #374151 !important;
}
.nav-link:hover {
color: #030712 !important;
}
.page-Main_Page .contentHeader {
display: none;
}
.card {
height: 250px;
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
border-radius: 0.75rem;
}
.card:hover {
box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}
.card-block {
display: grid;
align-content: space-between;
height: 100%;
}
.primary-btn {
margin-right: auto;
margin-left: auto;
background-color: #222;
border-radius: 4px;
border-style: none;
box-sizing: border-box;
color: #fff !important;
cursor: pointer;
display: inline-block;
font-family: "Farfetch Basis","Helvetica Neue",Arial,sans-serif;
font-size: 16px;
font-weight: 700;
line-height: 1.5;
margin: 0;
max-width: none;
min-height: 44px;
min-width: 10px;
outline: none;
overflow: hidden;
padding: 9px 20px 8px;
position: relative;
text-align: center;
text-transform: none;
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
width: 100%;
}
.primary-btn:hover,
.primary-btn:focus {
opacity: .75;
}
.smw-datatable select {
background: #fff;
}
.smw-datatable th a {
color: black;
}
#pfForm .createboxInput, #pfForm .mandatoryField, #pfForm textarea {
max-width: 98% !important;
}
/* Drilldown customization */
.drilldown-btn-wrapper {
max-width: 50%;
}
.drilldown-results {
-webkit-filter: blur(5px);
-moz-filter: blur(5px);
-o-filter: blur(5px);
-ms-filter: blur(5px);
filter: blur(5px);
}
.drilldown-categories-wrapper {
display: none;
}
.drilldown-filter {
background-color: #fafafa;
border-radius: 2px;
padding: 5px;
border-color: #e4e4e7;
border-width: 1px;
border-style: solid;
}
.drilldown-filter:hover {
background-color: #f4f4f5;
}
.drilldown-values-toggle {
padding-right: 6px;
}
/* WIP banner */
.wip-alert {
position: fixed;
display: none;
bottom: 0;
left: 50%;
transform: translate(-50%, 0);
z-index: 999;
}
/* Custom navbar breakpoint */
@media (min-width: 1350px){
.navbar-expand-custom {
flex-direction: row;
flex-wrap: nowrap;
justify-content: flex-start;
}
.navbar-expand-custom .navbar-nav {
flex-direction: row;
}
.navbar-expand-custom .dropdown-menu {
position: absolute;
}
.navbar-expand-custom .nav-link {
padding-right: .5rem;
padding-left: .5rem;
}
.navbar-expand-custom > .container {
flex-wrap: nowrap;
}
.navbar-expand-custom .navbar-collapse {
display: flex!important;
flex-basis: auto;
}
.navbar-expand-custom .navbar-toggler {
display: none;
}
}
/* CSS to be placed in MediaWiki:Common.css */
.version-tree {
text-align: center;
padding: 20px;
font-family: sans-serif;
}
.tree-node {
display: inline-block;
vertical-align: top;
text-align: center;
padding: 0 10px;
position: relative;
}
.node-content {
position: relative;
padding: 10px 0;
}
.node-box {
display: inline-block;
border: 1px solid #ccc;
border-radius: 5px;
padding: 5px 15px;
background: #f8f9fa;
position: relative;
z-index: 1;
}
.node-children {
position: relative;
margin-top: 20px;
}
/* Lines connecting nodes */
.node-children:before {
content: '';
position: absolute;
top: -20px;
left: 50%;
border-left: 1px solid #ccc;
height: 20px;
}
.tree-node .tree-node:before {
content: '';
position: absolute;
top: 0;
left: 50%;
border-left: 1px solid #ccc;
height: 10px;
}
.node-children .tree-node:first-child:after,
.node-children .tree-node:last-child:after {
content: '';
position: absolute;
top: 0;
width: 50%;
height: 10px;
border-top: 1px solid #ccc;
}
.node-children .tree-node:first-child:after {
right: 50%;
}
.node-children .tree-node:last-child:after {
left: 50%;
}
.node-children .tree-node:only-child:after {
display: none;
}
/* Horizontal line connecting siblings */
.node-children {
position: relative;
}
.node-children:after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
border-top: 1px solid #ccc;
}
.node-children .tree-node:only-child:before {
height: 10px;
}
/* Modern WikiTable Styles */
.wikitable {
background-color: #ffffff;
border-collapse: collapse;
margin: 1em 0;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
width: 100%;
}
.wikitable > tr > th,
.wikitable > * > tr > th {
background-color: #f8f9fa;
border: 1px solid #dee2e6;
padding: 0.75rem;
color: #495057;
font-weight: 600;
text-align: left;
vertical-align: middle;
}
.wikitable > tr > td,
.wikitable > * > tr > td {
border: 1px solid #dee2e6;
padding: 0.75rem;
vertical-align: middle;
color: #212529;
}
.wikitable > tr:nth-child(even),
.wikitable > * > tr:nth-child(even) {
background-color: rgba(0,0,0,0.02);
}
.wikitable > tr:hover,
.wikitable > * > tr:hover {
background-color: rgba(0,0,0,0.04);
transition: background-color 0.15s ease-in-out;
}
/* Responsive table wrapper */
.table-responsive {
display: block;
width: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
margin-bottom: 1rem;
}
/* Sort indicators if sortable tables are used */
.wikitable th.headerSort {
cursor: pointer;
}
.wikitable th.headerSort:after {
content: '↕';
display: inline-block;
margin-left: 0.5em;
opacity: 0.5;
}
.wikitable th.headerSortUp:after {
content: '↑';
opacity: 1;
}
.wikitable th.headerSortDown:after {
content: '↓';
opacity: 1;
}
/* Caption styling */
.wikitable > caption {
padding: 0.75rem;
color: #6c757d;
text-align: left;
caption-side: top;
font-style: italic;
border-bottom: 2px solid #dee2e6;
}
/* Mobile optimizations */
@media (max-width: 768px) {
.wikitable > tr > th,
.wikitable > * > tr > th,
.wikitable > tr > td,
.wikitable > * > tr > td {
padding: 0.5rem;
}
}
/** DataTables **/
/* Modern Semantic MediaWiki DataTable Styles */
.smw-datatable.datatable {
background-color: #ffffff;
border-collapse: collapse;
margin: 1em 0;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
width: 100%;
}
/* Header styling */
.smw-datatable.datatable thead th,
.smw-datatable.datatable thead td {
background-color: #f8f9fa;
border: 1px solid #dee2e6;
padding: 0.75rem;
color: #495057;
font-weight: 600;
text-align: left;
vertical-align: middle;
}
/* Cell styling */
.smw-datatable.datatable tbody td {
border: 1px solid #dee2e6;
padding: 0.75rem;
vertical-align: middle;
color: #212529;
}
/* Striping */
.smw-datatable.datatable tbody tr:nth-child(even) {
background-color: rgba(0,0,0,0.02);
}
/* Hover effect */
.smw-datatable.datatable tbody tr:hover {
background-color: rgba(0,0,0,0.04);
transition: background-color 0.15s ease-in-out;
}
/* DataTables specific elements */
.smw-datatable.datatable {
margin: 1em 0;
padding: 0;
}
/* Search box styling */
.smw-datatable.datatable_filter input {
padding: 0.375rem 0.75rem;
font-size: 1rem;
line-height: 1.5;
color: #495057;
background-color: #fff;
border: 1px solid #ced4da;
border-radius: 0.25rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
margin-left: 0.5em;
}
.smw-datatable.datatable_filter input:focus {
color: #495057;
background-color: #fff;
border-color: #80bdff;
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}
/* Pagination styling */
.smw-datatable .dataTables_paginate {
margin-top: 1rem;
}
.smw-datatable .dataTables_paginate .paginate_button {
padding: 0.375rem 0.75rem;
margin-left: 2px;
border: 1px solid #dee2e6;
border-radius: 0.25rem;
color: #007bff !important;
background-color: #fff;
cursor: pointer;
}
.smw-datatable .dataTables_paginate .paginate_button:hover {
color: #0056b3 !important;
text-decoration: none;
background-color: #e9ecef;
border-color: #dee2e6;
}
.smw-datatable .dataTables_paginate .paginate_button.current,
.smw-datatable .dataTables_paginate .paginate_button.current:hover {
color: #fff !important;
background-color: #007bff;
border-color: #007bff;
}
.smw-datatable .dataTables_paginate .paginate_button.disabled {
color: #6c757d !important;
cursor: not-allowed;
background-color: #fff;
border-color: #dee2e6;
}
/* Length changing section */
.smw-datatable .dataTables_length select {
padding: 0.375rem 1.75rem 0.375rem 0.75rem;
font-size: 1rem;
line-height: 1.5;
color: #495057;
background-color: #fff;
border: 1px solid #ced4da;
border-radius: 0.25rem;
margin: 0 0.5em;
}
/* Info section */
.smw-datatable .dataTables_info {
padding-top: 0.85em;
color: #6c757d;
}
/* Mobile optimizations */
@media (max-width: 768px) {
.smw-datatable.datatable thead th,
.smw-datatable.datatable thead td,
.smw-datatable.datatable tbody td {
padding: 0.5rem;
}
.smw-datatable.datatable_wrapper {
padding: 0.5rem;
}
.smw-datatable .dataTables_filter,
.smw-datatable .dataTables_length,
.smw-datatable .dataTables_info,
.smw-datatable .dataTables_paginate {
float: none;
text-align: center;
margin: 0.5rem 0;
}
}