Toggle 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
Attempt to fix weird code block issues
Try to get rid of code/pre processing on admonitions
Line 7: Line 7:
}
}


/* Base Admonition Styles */
.admonition {
.admonition {
   display: flex;
   display: flex;
Line 15: Line 14:
   margin: 1.5em 0;
   margin: 1.5em 0;
   border: 1px solid #ddd;
   border: 1px solid #ddd;
  background-color: #e6ffed; /* Customize based on the type */
}
}


Line 29: Line 29:
}
}


.admonition-title {
.admonition-title, .admonition-text {
   font-weight: bold;
   font-weight: normal;
  margin: 0;
  padding: 0;
   background-color: transparent;
   background-color: transparent;
  padding: 0;
   border: none;
   border: none;
   display: inline-block; /* Use inline-block to allow margin */
   display: block;
   margin-bottom: 0; /* Adjust margin as needed */
   color: inherit; /* Ensures text color follows the context */
}
}


.admonition-text {
.admonition-title code, .admonition-title pre,
  margin: 0;
.admonition-text code, .admonition-text pre {
   background-color: transparent;
   background-color: transparent;
  padding: 0;
   border: none;
   border: none;
   display: block; /* Ensure text is block-level */
   color: inherit;
}
}


/* Specific Admonition Types */
/* Specific Admonition Types */

Revision as of 06:49, 12 August 2024

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

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

.admonition {
  display: flex;
  align-items: flex-start;
  border-radius: 4px;
  padding: 16px;
  margin: 1.5em 0;
  border: 1px solid #ddd;
  background-color: #e6ffed; /* Customize based on the type */
}

.admonition-icon {
  font-size: 24px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admonition-content {
  flex: 1;
}

.admonition-title, .admonition-text {
  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-text code, .admonition-text pre {
  background-color: transparent;
  border: none;
  color: inherit;
}


/* Specific Admonition Types */

/* Note */
.admonition-note {
  background-color: #f0f6ff;
  border-left: 4px solid #2196f3;
}

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

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

/* Warning */
.admonition-warning {
  background-color: #ffe6e6;
  border-left: 4px solid #f44336;
}