Toggle menu
44
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
Try to get rid of code/pre processing on admonitions
No edit summary
Line 7: Line 7:
}
}


/* Base Admonition Styling */
.admonition {
.admonition {
   display: flex;
   display: flex;
Line 14: Line 15:
   margin: 1.5em 0;
   margin: 1.5em 0;
   border: 1px solid #ddd;
   border: 1px solid #ddd;
   background-color: #e6ffed; /* Customize based on the type */
   background-color: var(--admonition-bg, #e6ffed); /* Fallback to green */
}
}


Line 29: Line 30:
}
}


.admonition-title, .admonition-text {
/* Reset Styling for Code Blocks within Admonitions */
  font-weight: normal;
  margin: 0;
  padding: 0;
  background-color: transparent;
  border: none;
  display: block;
  color: inherit; /* Ensures text color follows the context */
}
 
.admonition-title code, .admonition-title pre,  
.admonition-title code, .admonition-title pre,  
.admonition-text code, .admonition-text pre {
.admonition-text code, .admonition-text pre,
   background-color: transparent;
.admonition-title .mw-code, .admonition-text .mw-code {
   border: none;
   background-color: transparent !important;
   color: inherit;
   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 */
/* Specific Admonition Types */
/* Note */
.admonition-note {
.admonition-note {
   background-color: #f0f6ff;
   --admonition-bg: #f0f8ff;
   border-left: 4px solid #2196f3;
   border-color: #a2c2e0;
}
}


/* Tip */
.admonition-tip {
.admonition-tip {
   background-color: #e6ffed;
   --admonition-bg: #e6ffed;
   border-left: 4px solid #4caf50;
   border-color: #8acc90;
  display: flex;
  align-items: center;
}
}


/* Caution */
.admonition-info {
.admonition-caution {
   --admonition-bg: #e7f5ff;
   background-color: #fff4e5;
   border-color: #a3c2f0;
   border-left: 4px solid #ff9800;
}
}


/* Warning */
.admonition-warning {
.admonition-warning {
   background-color: #ffe6e6;
   --admonition-bg: #fff8e1;
   border-left: 4px solid #f44336;
  border-color: #eac261;
}
 
.admonition-danger {
  --admonition-bg: #ffe5e5;
   border-color: #e09191;
}
}

Revision as of 06:52, 12 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: 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;
}

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