mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-11 21:34:43 -04:00
Support WikiMed lack of hard-coded styling and more specificity
Former-commit-id: 65f49cf190e38853ecf938f4985d7a9162da0e49 [formerly 6c63984d98295ece379ba9f00dcc7b7832e80ade] Former-commit-id: f43cf86b034da38561682cb6a121add252584bd0
This commit is contained in:
parent
8f292c612d
commit
c53e382aec
@ -668,6 +668,9 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'q', 'module'
|
|||||||
if (!contentElement) continue;
|
if (!contentElement) continue;
|
||||||
var docStyle = contentElement.style;
|
var docStyle = contentElement.style;
|
||||||
if (!docStyle) continue;
|
if (!docStyle) continue;
|
||||||
|
if (contentElement.className == "mw-body") {
|
||||||
|
docStyle.padding = "1em";
|
||||||
|
}
|
||||||
if (params.removePageMaxWidth == "auto") {
|
if (params.removePageMaxWidth == "auto") {
|
||||||
docStyle.maxWidth = zimType == "desktop" ? "100%" : "55.8em";
|
docStyle.maxWidth = zimType == "desktop" ? "100%" : "55.8em";
|
||||||
docStyle.cssText = docStyle.cssText.replace(/(max-width[^;]+)/i, "$1 !important");
|
docStyle.cssText = docStyle.cssText.replace(/(max-width[^;]+)/i, "$1 !important");
|
||||||
@ -675,6 +678,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'q', 'module'
|
|||||||
docStyle.maxWidth = params.removePageMaxWidth ? "100%" : "55.8em";
|
docStyle.maxWidth = params.removePageMaxWidth ? "100%" : "55.8em";
|
||||||
docStyle.cssText = docStyle.cssText.replace(/(max-width[^;]+)/i, "$1 !important");
|
docStyle.cssText = docStyle.cssText.replace(/(max-width[^;]+)/i, "$1 !important");
|
||||||
}
|
}
|
||||||
|
docStyle.margin = "0 auto";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$('input:radio[name=useMathJax]').on('click', function (e) {
|
$('input:radio[name=useMathJax]').on('click', function (e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user