Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.css

MediaWiki interface page
Revision as of 06:54, 12 August 2024 by Technofied (talk | contribs) (Finally, fix icon for admonitions)

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 */

/* 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: 1px solid #ddd;
  background-color: var(--admonition-bg, #e6ffed); /* Fallback to green */
}

.admonition-icon {
  font-size: 24px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent !important; /* Remove grey box */
  border: none !important;
  color: inherit !important; /* Ensure it uses the correct color */
  padding: 0 !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;
}

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

.admonition-tip {
  --admonition-bg: #e6ffed;
  border-color: #8acc90;
}

.admonition-info {
  --admonition-bg: #e7f5ff;
  border-color: #a3c2f0;
}

.admonition-warning {
  --admonition-bg: #fff8e1;
  border-color: #eac261;
}

.admonition-danger {
  --admonition-bg: #ffe5e5;
  border-color: #e09191;
}