Refinement of page border display

Former-commit-id: 0b87d492155a4eee0a1568b92c0ce0a89c3fa1b9 [formerly b6d411f2f038d81740737b721b374ac4bca002e7]
Former-commit-id: 63ef213cf2814e071cd2e4c1e1bd20c4761104de
This commit is contained in:
Jaifroid 2018-03-01 22:46:33 +00:00
parent 6c56379583
commit 5c8c623997
2 changed files with 4 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -684,13 +684,16 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'q', 'module'
if (!docStyle) continue;
if (contentElement.className == "mw-body") {
docStyle.padding = "1em";
docStyle.border = "1px solid #a7d7f9";
}
if (params.removePageMaxWidth == "auto") {
docStyle.maxWidth = zimType == "desktop" ? "100%" : "55.8em";
docStyle.cssText = docStyle.cssText.replace(/(max-width[^;]+)/i, "$1 !important");
docStyle.border = "0";
} else {
docStyle.maxWidth = params.removePageMaxWidth ? "100%" : "55.8em";
docStyle.cssText = docStyle.cssText.replace(/(max-width[^;]+)/i, "$1 !important");
if (params.removePageMaxWidth || zimType == "mobile") docStyle.border = "0";
}
docStyle.margin = "0 auto";
}