Page MenuHomePhabricator

Mobile version of wikiversity is not loading (some?) CSS
Closed, ResolvedPublic


Mobile version is not loading the .correction class, so some hidden text appears in the mobile version.

Also the submit buttons seem to be missing, visually speaking, although they still work when pressed:

Screenshot from 2017-03-09 14:20:11.png (259×312 px, 17 KB)

Event Timeline

Mvolz lowered the priority of this task from High to Medium.Mar 9 2017, 2:12 PM
Mvolz created this task.
Mvolz renamed this task from Mobile version of wikiversity is not loading CSS to Mobile version of wikiversity is not loading (some?) CSS.Mar 9 2017, 2:16 PM

Hello, just a wild guess from me. I worked a bit on the extension recently.

Could it be this line?

Edit: no sorry, does not make sense

Resources are loaded dynamically via PHP and not via resource loader and maybe that is not working on mobile

@Mvolz, where is .correction defined?

Sorry for linking to Github. I am on mobile at the moment

I suspect the ResourceLoader module that provides these styles does not have the target set correctly. See Apologies if this is not the problem.

You can also add the nomobile class to an element to avoid it from displaying in mobile.

I would be very surprised if this is related to MobileFrontend so I've removed that tag.

I figured out the issue.

The first problem is about not specifying the "target": "mobile" property in extension.json (which is an easy fix).

Even after fixing that there are still some issues: the style of some elements of the extension (such as the submit button and the input field) are overwritten by mobile front-end which resets them to plain, borderless, backgroundless elements (making the input fields even "invisible", see attached screenshot).

tmp0faCyp-save.png (195×952 px, 21 KB)

Now I need to hear some opinions on how to fix it.

I have in mind two options:

  • style the components via CSS on mobile to make them look like they do on desktop
    • this will require a new CSS file and a new hook
  • add mediawiki-ui-*classes to buttons and input boxes, so they will look like "native" Mediawiki components both on mobile and on desktop
    • see attached screenshot

tmpAm482Q-save.png (173×621 px, 11 KB)

tmp0hw5DD-save.png (243×552 px, 16 KB)

I prefer the second option.


For the first case you don't need to create a new hook. You can create a skin specific file, something like this.

I agree with you that adding the appropriate classes is a better solution.