Jump to content

MediaWiki:Mobile.css: Difference between revisions

From The Commentary Community Wiki
Created page with "All CSS here will be loaded for users of the mobile site: Force better word breaking on long strings without breaking normal text: body, .mw-parser-output p, .mw-parser-output li, .mw-parser-output td, .mw-parser-output th { overflow-wrap: break-word; modern standard: word-wrap: break-word; legacy: -webkit-hyphens: auto; iOS/Safari: -ms-hyphens: auto; Edge/IE: hyphens: auto;..."
 
No edit summary
Line 1: Line 1:
/* All CSS here will be loaded for users of the mobile site */
/* All CSS here will be loaded for users of the mobile site */
/* Force better word breaking on long strings without breaking normal text */
/* Force better word breaking on long strings without breaking normal text */
body,
body,

Revision as of 23:34, 8 March 2026

/* All CSS here will be loaded for users of the mobile site */

/* Force better word breaking on long strings without breaking normal text */
body,
.mw-parser-output p,
.mw-parser-output li,
.mw-parser-output td,
.mw-parser-output th {
    overflow-wrap: break-word;      /* modern standard */
    word-wrap: break-word;          /* legacy */
    -webkit-hyphens: auto;          /* iOS/Safari */
    -ms-hyphens: auto;              /* Edge/IE */
    hyphens: auto;                  /* others */
}

/* If you want to allow hyphenation only on very long words */
.mw-parser-output {
    hyphens: auto;
}

/* For tables that overflow horizontally */
.mw-parser-output table {
    width: 100% !important;
    table-layout: fixed;
}