Although the convention of where to put conventions remains somewhat
contentious, the team's desired conventions for Desktop Improvments have
so far been, for the most part, general and could be useful for any
project our team owns (e.g. MobileFrontend, Minerva, etc).
Therefore, I added/made revisions to the
https://www.mediawiki.org/wiki/Reading/Web/Coding_conventions wiki page
as this seems the be the single source of truth of our team specific
conventions that span across repos.
This commit just links to these changes which follows the same pattern
as Minerva and MobileFrontend.
Additional Changes:
* Added installation section similar to Minerva Skin
Bug: T239269
Change-Id: I41c71fba1228086f1830d8bb0808227b62ebf5cd
The logo is configured as a relative URL.
CSSMin encodeImageAsDataURI requires a file path.
There seems to be no reason to use a data uri here.
The print stylesheet is loaded on page load so the image
will be downloaded before a print action takes place.
Inspecting I788bcecadf26e4e5558b5b37e6fb1b2e9378277e
using a data uri makes little difference to the synchronous
nature of a print.
Bug: T177800
Change-Id: I0254ae8e360f09fe1c786695510550c7fec02026
Logo cannot be displayed as a background image because it won't be
visible in print unless the user prints backgrounds too.
A sample configuration looks like this:
$wgVectorPrintLogo = [
'url' => 'https://en.wikipedia.org/static/images/mobile/copyright/wikipedia-wordmark-en.svg',
'width' => 174,
'height' => 27
];
The solution presented in the patch has a downside of not being able
to scale images down if their dimensions are bigger than the
dimensions specified in the config variable. For example, if we want
to go with an SVG image, then IE8 won't be able to render it.
Alternatively, if we want to go with a PNG image, its dimensions need
to match the exact dimensoins in the config variable, otherwise the
image will show up larger or smaller depending on its dimensions.
A more complicated approach of scaling images using `transform: scale`
hasn't been used because we wanted to keep the configuration simple
while supporting the majority of our users. With the current change,
we can reuse the existing configuration options from Minerva, for
exmaple. It would look something like this:
$wgVectorPrintLogo = [
'url' => $wgMFCustomLogos['copyright'],
'width' => $wgMFCustomLogos['copyright-width'],
'height' => $wgMFCustomLogos['copyright-height']
];
Bug: T169826
Change-Id: If8f9f8d95fd3c955ece37d6c8ab6995596189667