MediaWiki:Common.css

From Seven Sages of Rome
Revision as of 16:28, 20 November 2024 by Noeth (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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%;
}

#pfForm :not(.dateInput):not(.monthInput):not(.yearInput) > input,
#pfForm :not(.dateInput):not(.monthInput):not(.yearInput) > .select2,
#pfForm :not(.dateInput):not(.monthInput):not(.yearInput) > .pf-select2-container,
#pfForm :not(.dateInput):not(.monthInput):not(.yearInput) > .oo-ui-comboBoxInputWidget {
	width: 100% !important;
}

/* Drilldown customization */
.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;
    }
}

/* Version test */
/* Reset default list styling */
ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

/* Container for the entire hierarchy */
.hierarchy {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background-color: #f4f4f4;
}

/* Shared node styling */
.hierarchy ul {
  display: flex;
  justify-content: center;
  position: relative;
  padding-top: 20px;
}

.hierarchy ul::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  border-left: 2px solid #333;
  width: 0;
  height: 20px;
}

/* Individual list items */
.hierarchy li {
  position: relative;
  padding: 20px 10px;
  text-align: center;
}

/* Horizontal lines connecting siblings */
.hierarchy li::before,
.hierarchy li::after {
  content: '';
  position: absolute;
  top: 0;
  border-top: 2px solid #333;
}

.hierarchy li::before {
  right: 50%;
  border-right: 2px solid #333;
  width: 50%;
  height: 20px;
}

.hierarchy li::after {
  left: 50%;
  border-left: 2px solid #333;
  width: 50%;
  height: 20px;
}

/* Remove lines for first and last children */
.hierarchy li:first-child::before {
  border-top-left-radius: 10px;
}

.hierarchy li:last-child::after {
  border-top-right-radius: 10px;
}

/* Remove lines for items without children */
.hierarchy li:only-child::before,
.hierarchy li:only-child::after {
  display: none;
}

/* Node styling */
.hierarchy a {
  display: inline-block;
  padding: 10px;
  background-color: #fff;
  border: 2px solid #333;
  border-radius: 5px;
  text-decoration: none;
  color: #333;
  white-space: nowrap;
}

.hierarchy a:hover {
  background-color: #e0e0e0;
}