Last modified: 2014-02-12 23:55:04 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T36325, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34325 - MobileFrontend extension doesn't load MediaWiki:Common.css
MobileFrontend extension doesn't load MediaWiki:Common.css
Status: RESOLVED WONTFIX
Product: MobileFrontend
Classification: Unclassified
stable (Other open bugs)
unspecified
All All
: Low normal
: ---
Assigned To: Nobody - You can work on this!
:
: 38833 40297 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-10 23:17 UTC by MZMcBride
Modified: 2014-02-12 23:55 UTC (History)
14 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
First stab at getting common.css and ResourceLoader into MobileFrontend (2.67 KB, application/octet-stream)
2012-04-03 10:08 UTC, Jon
Details

Description MZMcBride 2012-02-10 23:17:35 UTC
As reported at <https://www.mediawiki.org/wiki/Thread:Extension_talk:MobileFrontend/Common.css_ignored%3F>, the MobileFrontend extension apparently load MediaWiki:Common.css. MediaWiki:Common.css is the styling that should apply to the entire site.

Looking at the page source of <https://en.m.wikipedia.org/> seems to confirm that MediaWiki:Common.css is currently completely ignored.
Comment 1 Jon 2012-03-28 12:34:16 UTC
This is by design. Giving projects the ability to define their own custom CSS specifically for mobile devices would be a better solution as described in bug 22659

Potentially we could imagine the custom css redirecting to Common.css where that is really the desired behaviour.

*** This bug has been marked as a duplicate of bug 22659 ***
Comment 2 Krinkle 2012-03-29 11:16:18 UTC
Un-duping.

There should be no need to duplicate stylesheets for mobile. Mobile should just not surpress the default load queue like this. At least it should include in it's in queue crucial things like MediaWiki:Common.css and MediaWiki:<skin>.css because many modern templates will use css classes instead of inline styles and they look broken with out it.
Comment 3 Derk-Jan Hartman 2012-03-30 18:10:38 UTC
Common.css is mostly >content< styling specific to a particular mediawiki installation, so should be applied to content, be it mobile or not.

NEXT to that, we also need mobile specific styling of course, but I see no reason to close this as dupe.
Comment 4 Jon 2012-04-03 10:08:07 UTC
Created attachment 10369 [details]
First stab at getting common.css and ResourceLoader into MobileFrontend

The currently problem I'm hitting is that the skin is also served up by ResourceLoader which I do not want as skins are not currently mobile aware and introduce a lot of breakage. 

As I understand it the only way to remove the skin from the outputted css (at the moment) is via doing a horrible str_replace to remove skin.vector - I guess this will not work if another skin is being used?

Can someone take a look at my diff and suggest a better way of removing the skin from the output?

Even better could ResourceLoader be updated so that skins can be turned off?
Comment 5 Jon 2012-04-04 08:47:58 UTC
Addressed in https://gerrit.wikimedia.org/r/#change,4226 awaiting review
Comment 6 Jon 2012-04-09 23:19:43 UTC
Merged
https://gerrit.wikimedia.org/r/4226
Comment 7 Jon 2012-06-02 12:54:09 UTC
Common.css no longer seems to be being applied :(
Comment 8 Max Semenik 2012-07-05 21:43:22 UTC
https://gerrit.wikimedia.org/r/14419
Comment 9 Jon 2012-08-02 20:45:54 UTC
*** Bug 38833 has been marked as a duplicate of this bug. ***
Comment 10 Jon 2012-08-02 20:46:47 UTC
Reopened as this is yet to be merged and seems to be still under discussion
Comment 11 Jon 2012-09-19 05:36:58 UTC
*** Bug 40297 has been marked as a duplicate of this bug. ***
Comment 12 Jon 2012-09-29 00:58:56 UTC
MediaWiki:Mobile.css has been added to provide a way to target css to mobile - this is now merged into the current dev version.

Since the original question was "In our installation it seems to completely ignore the content of Mediawiki:Commons.css. Is there a setting for this? An alternative CSS page?"  which has now been answered I'm going to mark this as resolved.

I think enabling MediaWiki:Common.css in future is a separate discussion that should be discussed outside bugzilla - either on mailing lists or wiki pages till we have more consensus.

I've not tested this but I'm assuming MediaWiki:Mobile.css could transclude MediaWiki:Common.css if this behavior was really really wanted.
Comment 13 MZMcBride 2012-09-29 01:23:18 UTC
(In reply to comment #12)
> MediaWiki:Mobile.css has been added to provide a way to target css to mobile -
> this is now merged into the current dev version.

Right, but that's outside the scope of this bug. MediaWiki:Mobile.js and MediaWiki:Mobile.css are related to bug 22659 ("Give projects the opportunity to add mobile specific JS/CSS").

> Since the original question was "In our installation it seems to completely
> ignore the content of Mediawiki:Commons.css. Is there a setting for this? An
> alternative CSS page?"  which has now been answered I'm going to mark this as
> resolved.
> 
> I think enabling MediaWiki:Common.css in future is a separate discussion that
> should be discussed outside bugzilla - either on mailing lists or wiki pages
> till we have more consensus.

This bug tracks the "MediaWiki:Common.css loading on mobile" issue ("MobileFrontend extension doesn't load MediaWiki:Common.css"). As far as I can tell, this bug has not been resolved fixed (i.e., the MobileFrontend extension continues to not load MediaWiki:Common.css, as it should; cf. comment 2 and comment 3).

If you can safely say that this bug will never, ever be fixed (i.e., MobileFrontend will never, ever load MediaWiki:Common.css [and MediaWiki:Common.js, I suppose]), this bug can be marked resolved wontfix. Otherwise, it should stay open.

> I've not tested this but I'm assuming MediaWiki:Mobile.css could transclude
> MediaWiki:Common.css if this behavior was really really wanted.

Transclusions on CSS and JS pages don't really work as one might expect.
Comment 14 Jon 2012-10-01 17:32:44 UTC
The original problem that was being raised as I read it was "I cannot target styles on to the mobile site". Going deeper I read this to mean 'there is something I styled on desktop that simply must be on mobile'. This is not the same as meaning 'everything style on desktop should be on mobile'. Currently MediaWiki:Common.css is not maintained with mobile in mind - most of the time it is fixing problems on desktop. In fact numerous of the css rules in MediaWiki:Common.css have been targeted in the MobileFrontend core to be optimised for mobile. There are also various rules that exist in MediaWiki:Common.css such as '.treeview ul' that don't appear on every page - so these are not in fact what I'd call 'common'. These add unnecessary bloat to mobile where every byte matters.

The fact that MediaWiki:Common.css is how styles get to the desktop site is irrelevant.

As far as I can see MediaWiki:Mobile.css allows people that are concerned about these things to target css to mobile users to address mobile specific problems.

There is a real opportunity here to include MediaWiki:Mobile.css on desktop and move styles applicable to both desktop and mobile to MediaWiki:Mobile.css - I think this is a much better approach and I think would get closer to what is needed.

FWIW a server admin who really really wants MediaWiki:Common.css in mobile can do so by adding the following line to their config:
$wgMobileSiteResourceLoaderModule['MediaWiki:Common.css'] = array( 'type' => 'style' );

Personally my opinion is this should be marked as WONTFIX but I'm marking it with the more optimistic LATER. This is not a bug. It's currently by design.
Comment 15 Andre Klapper 2012-12-14 11:10:01 UTC
[Closing as "WONTFIX" to get rid of the deprecated "LATER" resolution.]

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links