Toggle menu
100
201
1
1.8K
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
No edit summary
Implement better (?) sidebar
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
/* Make drawer always visible > 1300px */
@import url("/Template:Note/styles.css");
@media screen and ( min-width: 1300px ) {
/* To make images responsive */
    :root {
img {
        --fixed-menu-width: 240px;
max-width:100%;
    }
height:auto;
   
}
    .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;
    }


/* Base Admonition Styling */
    .citizen-drawer__header {
.admonition {
        padding-left: var( --space-xl );
  max-width: 100%; /* Ensure the box does not exceed the container width */
        padding-right: var( --space-xl );
  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,
    .citizen-drawer__logo {
.admonition-icon code,
        /* Hide drawer header logo */
.admonition-icon .mw-code {
        display: none;
  background-color: transparent !important;
    }
  border: none !important;
  color: inherit !important;
  padding: 0 !important;
  margin: 0 !important;
  font-family: inherit !important;
  font-size: inherit !important;
  display: inline !important;
}


.admonition-content {
    .citizen-drawer__siteinfo  .mw-logo-wordmark {
  flex: 1;
        font-size: 1.25rem;
}
    }


/* Reset Styling for Code Blocks within Admonitions */
    .citizen-siteStats {
.admonition-title code, .admonition-title pre,
        font-size: 0.8125rem;
.admonition-text code, .admonition-text pre,
    }
.admonition-title .mw-code, .admonition-text .mw-code {
  background-color: transparent !important;
  border: none !important;
  color: inherit !important;
  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 */
    #citizen-siteStats__item--images,
.admonition-note {
    #citizen-siteStats__item--users {
  --admonition-bg: #f0f8ff;
        /* Hide image and user stats to make space */
  --admonition-color: #a2c2e0;
        display: none;
  border-left-color: #a2c2e0; /* Set the left border color */
    }
}
   
 
    .citizen-drawer__menu {
.admonition-tip {
        padding-left: var( --space-xs );
  --admonition-bg: #e6ffed;
        padding-right: var( --space-xs );
  --admonition-color: #8acc90;
        grid-template-columns: 1fr;
  border-left-color: #8acc90; /* Set the left border color */
    }
}
 
.admonition-info {
  --admonition-bg: #e7f5ff;
  --admonition-color: #a3c2f0;
  border-left-color: #a3c2f0; /* Set the left border color */
}
 
.admonition-warning {
  --admonition-bg: #fff8e1;
  --admonition-color: #eac261;
  border-left-color: #eac261; /* Set the left border color */
}
 
.admonition-danger {
  --admonition-bg: #ffe5e5;
  --admonition-color: #e09191;
  border-left-color: #e09191; /* Set the left border color */
}
 
 
/* Add space to the start of admonition text */
.admonition-text {
  margin-left: 0.25em; /* Adjust the space as needed */
  clear: both; /* Ensure no floating elements affect text alignment */
  overflow-wrap: break-word; /* Ensure text wraps within the container */
}
 
/* Ensure no extra space is added to the title */
.admonition-title {
  margin-left: 0;
  overflow: hidden; /* Prevent content from overflowing */
  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 09:36, 8 February 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;
    }
}