Template:Scrollable Math/styles.css
Template page
More actions
/* === Scrollable Math Core Container === */
.scrollable-math {
display: block;
overflow-x: auto;
max-width: 100%;
padding: 4px 0;
margin: 0 !important;
background: transparent !important;
border: none !important;
box-shadow: none !important;
}
/* === REMOVE Citizen Card/Block Styling === */
/* Citizen applies backgrounds/borders to all direct child DIVs of mw-parser-output */
.mw-parser-output > .scrollable-math {
background: none !important;
background-color: transparent !important;
border: none !important;
box-shadow: none !important;
padding: 0 !important;
}
/* === REMOVE ANY INTERNAL BACKGROUNDS/BORDERS (Math Extension Elements) === */
.scrollable-math *,
.scrollable-math *::before,
.scrollable-math *::after {
background: transparent !important;
border: none !important;
box-shadow: none !important;
}
/* === FIX MULTILINE MATH WRAPPING === */
.scrollable-math math,
.scrollable-math .mwe-math-element {
display: block;
white-space: normal;
}
/* Wide formulas should scroll instead of squishing */
.scrollable-math .mwe-math-element {
min-width: max-content;
}
/* === REMOVE THE EMPTY <p> BEFORE / AFTER THE TEMPLATE === */
/* MediaWiki inserts empty paragraphs around block templates; collapse them */
p + .scrollable-math,
.scrollable-math + p {
margin: 0 !important;
padding: 0 !important;
line-height: 0 !important;
font-size: 0 !important;
}
/* Restore normal text size inside math block */
.scrollable-math,
.scrollable-math * {
font-size: inherit !important;
line-height: normal !important;
}/* === Scrollable Math Core Container === */
.scrollable-math {
display: block;
overflow-x: auto;
max-width: 100%;
padding: 4px 0;
margin: 0 !important;
background: transparent !important;
border: none !important;
box-shadow: none !important;
}
/* === REMOVE Citizen Card/Block Styling === */
/* Citizen applies backgrounds/borders to all direct child DIVs of mw-parser-output */
.mw-parser-output > .scrollable-math {
background: none !important;
background-color: transparent !important;
border: none !important;
box-shadow: none !important;
padding: 0 !important;
}
/* === REMOVE ANY INTERNAL BACKGROUNDS/BORDERS (Math Extension Elements) === */
.scrollable-math *,
.scrollable-math *::before,
.scrollable-math *::after {
background: transparent !important;
border: none !important;
box-shadow: none !important;
}
/* === FIX MULTILINE MATH WRAPPING === */
.scrollable-math math,
.scrollable-math .mwe-math-element {
display: block;
white-space: normal;
}
/* Wide formulas should scroll instead of squishing */
.scrollable-math .mwe-math-element {
min-width: max-content;
}
/* === REMOVE THE EMPTY <p> BEFORE / AFTER THE TEMPLATE === */
/* MediaWiki inserts empty paragraphs around block templates; collapse them */
p + .scrollable-math,
.scrollable-math + p {
margin: 0 !important;
padding: 0 !important;
line-height: 0 !important;
font-size: 0 !important;
}
/* Restore normal text size inside math block */
.scrollable-math,
.scrollable-math * {
font-size: inherit !important;
line-height: normal !important;
}