n0x-styles / wikipedia-dark

https://userstyles.world/style/1691/wikipedia-deep-dark-theme
44 stars 20 forks source link

broken on mobile urls #22

Open yardenac opened 5 years ago

yardenac commented 5 years ago

Sometimes people link to wikipedia's mobile domain, with URLs such as this: https://en.m.wikipedia.org/wiki/Main_Page

Something about those pages breaks this style. I see white bars around the article. Possible solutions for these pages:

kuchenmitsahne commented 5 years ago

While this is by no means a complete fix, I found that commenting out a single line can render the style usable on mobile, with only some minor issues (most notably the header, footer, sidebar, and search interface not being properly styled). On mobile, the current style squishes the content of the page to the right, which is most pronounced when viewing with a narrow screen (such as a phone in portrait orientation).

Screenshot of broken page: ![broken](https://user-images.githubusercontent.com/25233413/63215088-63777280-c0ef-11e9-9dbb-eb025118c0e3.png)

The culprit is the margin-left property found in this CSS rule:

https://github.com/n0x-styles/wikipedia-dark/blob/431f635d17301b9e9f770f1253db3a45ac20d315/wikipedia-dark.css#L453-L457

Simply commenting out that one line will fix this particular issue, as far as I can tell.

Screenshot of page after commenting out offending line ![fixed](https://user-images.githubusercontent.com/25233413/63215107-a6d1e100-c0ef-11e9-8566-2a544dc025be.png)

For those who want to keep using this theme on mobile, this may be an acceptable stopgap measure until someone takes on the job of styling the elements unique to the mobile site.