Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Create an account below if you want to be able to make edits.

Template:Scrollable Math/styles.css: Difference between revisions

Template page
Created page with ".scrollable-math { overflow-x: auto; white-space: nowrap; max-width: 100%; padding: 4px 0; } .scrollable-math math, .scrollable-math .mwe-math-element { white-space: nowrap; display: inline-block; }"
 
No edit summary
Line 1: Line 1:
.scrollable-math {
.scrollable-math {
     overflow-x: auto;
     overflow-x: auto;
    white-space: nowrap;
     max-width: 100%;
     max-width: 100%;
     padding: 4px 0;
     padding: 4px 0;
}
}


/* Allow formulas to wrap correctly inside multi-line environments */
.scrollable-math math,
.scrollable-math math,
.scrollable-math .mwe-math-element {
.scrollable-math .mwe-math-element {
     white-space: nowrap;
    display: block;      /* Block so multi-line formulas are clean */
     display: inline-block;
     white-space: normal; /* Allow line breaks inside cases/align */
}
 
/* Optional: prevent extremely wide formulas from breaking layout */
.scrollable-math math > .mwe-math-element {
     min-width: max-content;
}
}

Revision as of 14:55, 17 November 2025

.scrollable-math {
    overflow-x: auto;
    max-width: 100%;
    padding: 4px 0;
}

/* Allow formulas to wrap correctly inside multi-line environments */
.scrollable-math math,
.scrollable-math .mwe-math-element {
    display: block;      /* Block so multi-line formulas are clean */
    white-space: normal; /* Allow line breaks inside cases/align */
}

/* Optional: prevent extremely wide formulas from breaking layout */
.scrollable-math math > .mwe-math-element {
    min-width: max-content;
}