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:

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
Mvolz updated the task description. (Show Details)Mar 9 2017, 2:22 PM

@Mvolz, where is .correction defined?

cristianbaldi added a comment.EditedMar 9 2017, 5:42 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.

cristianbaldi added a comment.EditedMar 11 2017, 8:52 PM

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).

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

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.

Mvolz closed this task as Resolved.Jul 17 2017, 10:31 AM