https://bugzilla.wikimedia.org/show_bug.cgi?id=35815
Web browser: ---
Bug #: 35815
Summary: ResourceLoader modules which define only CSS styles
should be applied at server-side.
Product: MediaWiki
Version: 1.19
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Resource Loader
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected],
[email protected]
Classification: Unclassified
Mobile Platform: ---
When I tested my MediaWiki extension in Firefox with Javascript being turned
off, the stylesheet-only module did not load, so the visual appearance of page
was incorrect.
# not loaded with OutputPage::addModules( 'ext.jqgmap.styles' ) anymore,
# because when Javascript is off, the style does not appear
'ext.jqgmap.styles' => array(
'styles' => 'common.css',
'position' => 'top'
),
# Next line does not work when Javascript is disabled, thus was commented
out:
# $out->addModules( 'ext.jqgmap.styles' );
When I use "old-way" of loading stylesheet without using ResourceLoader, it
loads just fine even when JS is off:
# Loading 'ext.jqgmap.styles' manually, instead:
$out->addLink(
array(
'rel' => 'stylesheet',
'type' => 'text/css',
'href' => self::$scriptPath . '/common.css'
)
);
Why not to detect such modules and to load them at server-side instead of
client-side? Stylesheets are not scripts, they should be available even when JS
is off.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l