Toggle menu
210
343
1
4.1K
DemocracyCraft Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.css: Difference between revisions

MediaWiki interface page
m Reverted edit by Asexualdinosaur (talk) to last revision by Technofied
Tag: Rollback
Add infoboxes!
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
/* Make drawer always visible > 1300px */
@media screen and ( min-width: 1300px ) {
    :root {
        --fixed-menu-width: 240px;
    }
   
    .citizen-page-container {
        /* Reserve space for drawer */
        margin-left: calc( var( --header-size ) + var( --fixed-menu-width ) );
    }
   
    .citizen-drawer .citizen-dropdown-details {
        /* Hide drawer button */
        display: none;
    }
   
    .citizen-dropdown .citizen-menu__card, .citizen-dropdown .citizen-menu__card .citizen-ui-icon {
    content-visibility: visible;
    }
   
    .citizen-drawer__card {
        bottom: 0;
        /* Put drawer behind other header cards */
        z-index: -1;
        margin: 0;
        /* Compensate header border */
        margin-left: 1px;
        padding: 0;
        min-width: auto !important;
        width: var( --fixed-menu-width );
        max-height: none;
        border-right: 1px solid var( --border-color-base );
        border-radius: 0;
        background-color: var( --color-surface-0 );
        box-shadow: none;
        /* Force drawer to show */
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: none !important;
        visibility: visible !important;
        left:56px;
    }
   
    .citizen-drawer__card > * {
        /* Force drawer content to show */
        opacity: 1 !important;
    }


/* To make images responsive */
    .citizen-drawer__header {
img {
        padding-left: var( --space-xl );
max-width:100%;
        padding-right: var( --space-xl );
height:auto;
    }
 
    .citizen-drawer__logo {
        /* Hide drawer header logo */
        display: none;
    }
 
    .citizen-drawer__siteinfo  .mw-logo-wordmark {
        font-size: 1.25rem;
    }
 
    .citizen-siteStats {
        font-size: 0.8125rem;
    }
 
    #citizen-siteStats__item--images,
    #citizen-siteStats__item--users {
        /* Hide image and user stats to make space */
        display: none;
    }
   
    .citizen-drawer__menu {
        padding-left: var( --space-xs );
        padding-right: var( --space-xs );
        grid-template-columns: 1fr;
    }
}
}


/* Base Admonition Styling */
.admonition {
  max-width: 100%; /* Ensure the box does not exceed the container width */
  display: flex;
  align-items: flex-start;
  border-radius: 4px;
  padding: 16px;
  margin: 1.5em 0;
  border-top: none; /* Remove top border */
  border-right: none; /* Remove right border */
  border-bottom: none; /* Remove bottom border */
  border-left: 5px solid; /* Add a 5px solid left border */
  background-color: var(--admonition-bg, #e6ffed); /* Fallback to green */
  word-wrap: break-word; /* Ensure long words break inside the container */
  word-break: break-word; /* Alternative for modern CSS */
  overflow-wrap: break-word; /* Ensure long words break inside the container */
  box-sizing: border-box; /* Ensure padding and borders are included in the element's width */
}


.admonition-icon pre,
/* Infoboxes */
.admonition-icon code,
.infobox {
.admonition-icon .mw-code {
border: 1px solid #a2a9b1;
  background-color: transparent !important;
color: black;
  border: none !important;
padding: 0.2em;
  color: inherit !important;
font-size: 88%;
  padding: 0 !important;
line-height: 1.5em;
  margin: 0 !important;
border-spacing: 3px;
  font-family: inherit !important;
  font-size: inherit !important;
  display: inline !important;
}
}


.admonition-content {
@media screen {
  flex: 1;
.infobox {
background-color: #f8f9fa;
    }
}
}


/* Reset Styling for Code Blocks within Admonitions */
@media (max-width: 640px) {
.admonition-title code, .admonition-title pre,
.infobox {
.admonition-text code, .admonition-text pre,
width: 100%;
.admonition-title .mw-code, .admonition-text .mw-code {
}
  background-color: transparent !important;
   
  border: none !important;
.infobox .nowrap {
  color: inherit !important;
white-space: normal;
  font-family: inherit !important;
}
  font-size: inherit !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline !important;
  word-wrap: break-word; /* Ensure text breaks within the container */
  word-break: break-word; /* Alternative for modern CSS */
  overflow-wrap: break-word; /* Ensure code blocks break properly within the container */
  box-sizing: border-box;
}
}


/* Specific Admonition Types */
@media (min-width: 640px) {
.admonition-note {
.infobox {
  --admonition-bg: #f0f8ff;
/* @noflip */
  --admonition-color: #a2c2e0;
margin: 0.5em 0 0.5em 1em;
  border-left-color: #a2c2e0; /* Set the left border color */
/* @noflip */
float: right;
/* @noflip */
clear: right;
width: 22em;
}
}
}


.admonition-tip {
.infobox-header,
  --admonition-bg: #e6ffed;
.infobox-label,
  --admonition-color: #8acc90;
.infobox-above,
  border-left-color: #8acc90; /* Set the left border color */
.infobox-full-data,
.infobox-data,
.infobox-below,
.infobox-subheader,
.infobox-image,
.infobox-navbar,
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox th,
.infobox td {
vertical-align: top;
}
}


.admonition-info {
.infobox-label,
  --admonition-bg: #e7f5ff;
.infobox-data,
  --admonition-color: #a3c2f0;
/* Remove element selector when every .infobox thing is using the standard module/templates  */
  border-left-color: #a3c2f0; /* Set the left border color */
.infobox th,
.infobox td {
/* @noflip */
text-align: left;
}
}


.admonition-warning {
/* Remove .infobox when element selectors above are removed */
  --admonition-bg: #fff8e1;
.infobox .infobox-above,
  --admonition-color: #eac261;
.infobox .infobox-title,
  border-left-color: #eac261; /* Set the left border color */
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox caption {
font-size: 125%;
font-weight: bold;
text-align: center;
}
}


.admonition-danger {
.infobox-title,
  --admonition-bg: #ffe5e5;
/* Remove element selector when every .infobox thing is using the standard module/templates  */
  --admonition-color: #e09191;
.infobox caption {
  border-left-color: #e09191; /* Set the left border color */
padding: 0.2em;
}
}


 
/* Remove .infobox when element selectors above are removed */
/* Add space to the start of admonition text */
.infobox .infobox-header,
.admonition-text {
.infobox .infobox-subheader,
  margin-left: 0.25em; /* Adjust the space as needed */
.infobox .infobox-image,
  clear: both; /* Ensure no floating elements affect text alignment */
.infobox .infobox-full-data,
  overflow-wrap: break-word; /* Ensure text wraps within the container */
.infobox .infobox-below {
text-align: center;
}
}


/* Ensure no extra space is added to the title */
/* Remove .infobox when element selectors above are removed */
.admonition-title {
.infobox .infobox-navbar {
  margin-left: 0;
/* @noflip */
  overflow: hidden; /* Prevent content from overflowing */
text-align: right;
  text-overflow: ellipsis; /* Add ellipsis if content is too long */
  font-weight: bold; /* Make the title bold */
  overflow-wrap: break-word; /* Ensure text wraps within the container */
  word-break: break-word;
}
}

Latest revision as of 15:10, 23 May 2025

/* Make drawer always visible > 1300px */
@media screen and ( min-width: 1300px ) {
    :root {
        --fixed-menu-width: 240px;
    }
    
    .citizen-page-container {
        /* Reserve space for drawer */
        margin-left: calc( var( --header-size ) + var( --fixed-menu-width ) );
    }
    
    .citizen-drawer .citizen-dropdown-details {
        /* Hide drawer button */
        display: none;
    }
    
    .citizen-dropdown .citizen-menu__card, .citizen-dropdown .citizen-menu__card .citizen-ui-icon {
    	content-visibility: visible;
    }
    
    .citizen-drawer__card {
        bottom: 0;
        /* Put drawer behind other header cards */
        z-index: -1;
        margin: 0;
        /* Compensate header border */
        margin-left: 1px;
        padding: 0;
        min-width: auto !important;
        width: var( --fixed-menu-width );
        max-height: none;
        border-right: 1px solid var( --border-color-base );
        border-radius: 0;
        background-color: var( --color-surface-0 );
        box-shadow: none;
        /* Force drawer to show */
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: none !important;
        visibility: visible !important;
        left:56px;
    }
    
    .citizen-drawer__card > * {
        /* Force drawer content to show */
        opacity: 1 !important;
    }

    .citizen-drawer__header {
        padding-left: var( --space-xl );
        padding-right: var( --space-xl );
    }

    .citizen-drawer__logo {
        /* Hide drawer header logo */
        display: none;
    }

    .citizen-drawer__siteinfo  .mw-logo-wordmark {
        font-size: 1.25rem;
    }

    .citizen-siteStats {
        font-size: 0.8125rem;
    }

    #citizen-siteStats__item--images,
    #citizen-siteStats__item--users {
        /* Hide image and user stats to make space */
        display: none;
    }
    
    .citizen-drawer__menu {
        padding-left: var( --space-xs );
        padding-right: var( --space-xs );
        grid-template-columns: 1fr;
    }
}


/* Infoboxes */
.infobox {
	border: 1px solid #a2a9b1;
	color: black;
	padding: 0.2em;
	font-size: 88%;
	line-height: 1.5em;
	border-spacing: 3px;
}

@media screen {
	.infobox {
		background-color: #f8f9fa;
    }
}

@media (max-width: 640px) {
	.infobox {
		width: 100%;
	}
    
	.infobox .nowrap {
		white-space: normal;
	}
}

@media (min-width: 640px) {
	.infobox {
		/* @noflip */
		margin: 0.5em 0 0.5em 1em;
		/* @noflip */
		float: right;
		/* @noflip */
		clear: right;
		width: 22em;
	}
}

.infobox-header,
.infobox-label,
.infobox-above,
.infobox-full-data,
.infobox-data,
.infobox-below,
.infobox-subheader,
.infobox-image,
.infobox-navbar,
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox th,
.infobox td {
	vertical-align: top;
}

.infobox-label,
.infobox-data,
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox th,
.infobox td {
	/* @noflip */
	text-align: left;
}

/* Remove .infobox when element selectors above are removed */
.infobox .infobox-above,
.infobox .infobox-title,
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox caption {
	font-size: 125%;
	font-weight: bold;
	text-align: center;
}

.infobox-title,
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox caption {
	padding: 0.2em;
}

/* Remove .infobox when element selectors above are removed */
.infobox .infobox-header,
.infobox .infobox-subheader,
.infobox .infobox-image,
.infobox .infobox-full-data,
.infobox .infobox-below {
	text-align: center;
}

/* Remove .infobox when element selectors above are removed */
.infobox .infobox-navbar {
	/* @noflip */
	text-align: right;
}