Toggle menu
45
133
1
1K
DemocracyCraft Wiki
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
Try to fix text escaping admonitions
Line 19: Line 19:
   border-left: 5px solid; /* Add a 5px solid left border */
   border-left: 5px solid; /* Add a 5px solid left border */
   background-color: var(--admonition-bg, #e6ffed); /* Fallback to green */
   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 */
}
}


Line 50: Line 52:
   margin: 0 !important;
   margin: 0 !important;
   display: inline !important;
   display: inline !important;
  word-wrap: break-word; /* Ensure text breaks within the container */
  word-break: break-word; /* Alternative for modern CSS */
}
}


Line 87: Line 91:
.admonition-text {
.admonition-text {
   margin-left: 0.25em; /* Adjust the space as needed */
   margin-left: 0.25em; /* Adjust the space as needed */
  clear: both; /* Ensure no floating elements affect text alignment */
}
}



Revision as of 04:17, 24 August 2024

/* CSS placed here will be applied to all skins */

/* To make images responsive */
img {
	max-width:100%;
	height:auto;
}

/* Base Admonition Styling */
.admonition {
  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 */
}

.admonition-icon pre, 
.admonition-icon code, 
.admonition-icon .mw-code {
  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 {
  flex: 1;
}

/* Reset Styling for Code Blocks within Admonitions */
.admonition-title code, .admonition-title pre, 
.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 */
}

/* Specific Admonition Types */
.admonition-note {
  --admonition-bg: #f0f8ff;
  --admonition-color: #a2c2e0;
  border-left-color: #a2c2e0; /* Set the left border color */
}

.admonition-tip {
  --admonition-bg: #e6ffed;
  --admonition-color: #8acc90;
  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 */
}

/* Ensure no extra space is added to the title */
.admonition-title {
  margin-left: 0;
  font-weight: bold; /* Make the title bold */
}