Thanks to the dependent change, the print logo is now provided
in core so we can remove the custom Vector ResourceLoader module
ResourceLoaderLessModule is replaced with a ResourceLoaderSkinModule
and gains the features capability replacing the need for
'mediawiki.skinning.interface' making use of the changes added in
6845912bcf1.
Note that for cached HTML both 'mediawiki.skinning.interface'
and skins.vector.styles will be loaded. We can avoid this
by renaming skins.vector.styles if necessary (but I'm not
sure if we'd want to do that)
Bug: T232140
Depends-On: I00899c16c0325f36b671baf17e88c2b5187b3526
Change-Id: I569e0d800e147eabc7852567acd140108613f074
A resources folder is the defacto-standard across mediawiki repos.
Vector now mirrors those by describing where files served by ResourceLoader
are located.
Change-Id: Ib7d8575112e8afaaa84221a6f30a15b34b51eb24
Since only one hook is specified for the BeforePageDisplayMobile hook,
replace the array of hooks with the single hook used.
Change-Id: Ic89a262f3fdba93c3ee10387b3b05137ce9dc4ad
The SkinVector implements IContextSource, thus it has to provide
the getConfig() method. Vector skin is currently using
it's own `vectorConfig` in one place and it passes the VectorConfig
to the VectorTemplate class. Sadly the VectorConfig is the same
thing what $this->getConfig() provides. There is no need to make
this code more complex by handling two different config containers
which at the end are the same GlobalVarConfig instances.
If we decide to handle VectorConfigs differently, let's thing it
through, for now we should simplify code and remove all uncessary
logic. Thanks to that, there is also no need to override the
setupTemplate().
Change-Id: I89c8a77f7d96f867c8c72e61f9e104e14d9512d9
If RelatedArtcles uses the SkinAfterContent hook (depends-on patch)
and we move the hook out of the main content block (parent patch),
it needs some styles to remain consistent.
Bug: T181242
Change-Id: I2c5d4034890a5164896c1ef0570b31465a275890
Depeds-on: Iebd759c0d1a536768d18953f372664df762d9e04
These removed styles match no elements in the
Special:Preferences page since the OOUI transformation.
Bug: T208923
Change-Id: Iccbdcea5d5f769edfd8640c536e31289da9ee954
Concatenating all `margin-left` rules. This has 0 byte-saving
impact after gzipping at all, it's just about code style.
Also applying coding convention on media query in 'skin.json'.
Change-Id: Ica8557fcd519dea913fe4c30b1be1bfe0d0919c0
SPDX released version 3 of their license list (<https://spdx.org/licenses/>),
which changed the FSF licenses to explicitly end in -only or -or-later
instead of relying on an easy to miss + symbol.
Bug: T183858
Change-Id: Ie8a20191fd9505eb5f0a6a3a010a602d2a44a58e
The revert looks like it has been performed incorrectly,
and I found a much better solution to the task anyway.
This reverts commit 7d2fc6df27.
Bug: T178028
Bug: T183640
Change-Id: Ib46c69b061b522fc6365459297ad3f3d4f4d0d0d
Remove feature flagging of print styles
Changes:
* Merge experimental module into skins.vector.styles
* Update skins.vector.styles RL class to support LESS variable
* Remove feature flag class in HTML and LESS (update indents in
LESS file)
Bug: T178028
Change-Id: I8d5c59c5c9f415ffbd7fa41a512cbea87887e9e7
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
These are feature flagged to allow editors to test before making
them the default. A class is added to the body tag to allow us
to switch between old and new styles at a later date.
To start with we introduce some typography improvements.
Further iterations will focus on other elements.
Changes:
* headings were previously diluted in the body content and difficult to spot.
This evens out the spacing between last content and its own content block.
* clear ownership of <p>s with its heading
* We would like to match Latex style body typography with single column.
The new styles reduce the number of pages by around 20-25%
* hyperlink underline -
This is a community requested feature. We do not use color in print styles
because it's printer friendly. Because of this, it is not possible to indicate
blue links in articles. If a user wants to know if this article exists on wikipedia,
it's not possible given solution.
We would like to underline the <a> tags in print styles.
it's better for accessibility as well.
Bug: T169823
Change-Id: I453ae43099796a74c39d965b796f2fa13942106c
With MobileFrontend installed applying
?useskin=vector&useformat=mobile will ensure that responsive vector
mode is invoked.
I'm keen to do this, as it would help to have more examples of skins
that are MobileFrontend aware as part of the work I am doing in
T166748
Change-Id: I81edd855a5e96400d1179fb10907fcc30ea43ef7
Also fix site search to use use the same shade of grey
as is used in OOUI and mw-ui.
Depends-On: I96686bb53cee1a833db8f4d0b691d5e4a1b82885
Change-Id: Ib6437b13760e8c13d06927cb45ef674a5f301e35
The Vector skin's responsive mode originally used 768px as a hardcoded
value for the media query set up in skin.json. I attempted to
switch to the @deviceWidthTablet global Less variable provided by
MediaWiki inside skin.json, but this would not work under any
circumstances. Evidently, ResourceLoader does not compile Less, so
it just ignores the media query if it contains a Less variable.
I was forced to leave the media query within skin.json blank
and hard-code it into responsive.less. When using the
@deviceWidthTablet variable inside responsive.less, it worked
fine. Obviously this is not ideal, as I am bypassing ResourceLoader,
but I have no other choice. See this comment (T124994#2864136) for
details.
Bug: T124994
Change-Id: I28565e5ba88be41dcd9cb38fc09cffe29d263e06
The feature was reverted in 5205405385397782b5288b429f49c9d8c97ac6c6 almost a
year ago, so it's pretty safe to say this styling is unnecessary.
This essentially reverts 2466e550e5.
Change-Id: I88b6465d5554d334cc34893bb0acf548a5fc440b
Any skins. prefixed ResourceLoader style modules are okay to run on mobile
given they should only run in the context of the skin.
See I7c000165c61a4bd2094f23b6ffd96335f7f7818f
with that patch and the following enabled:
$wgMFDefaultSkinClass = 'SkinVector';
$wgVectorResponsive = true;
you'll be able to use the Vector skin in mobile mode.
Change-Id: I7b796385ce9786c2c7900e5acc36b1b4dbbb5b97
Follow-up to 15a990b888. That didn't
work, the module is not named 'ooui'. And had it worked, it'd have
removed all the regular OOjs UI styles from the Vector skin, by
replacing them instead of adding.
Bug: T105300
Change-Id: Ic11147e9800788152621402eef7819191024aa71
My bad... skinname-<skinname> is used in core to get the skin name.
This reverts commit ac0d123ba8.
Change-Id: I3c7780f9f08081238744fde094804ea8f5dd191a
The installer hardcodes and expects to find a "skin.vector.styles"
module in skin.json, so moving it into a hook broke the styles. Moved it
back into skin.json, and left a comment so future developers don't make
the same mistake.
The responsive code is now a separate module,
"skins.vector.styles.responsive", which is only added to the page output
if VectorResponsive is enabled.
Bug: T106747
Change-Id: I7540b7871531ef650e799f012477cef6cdd32fb7
This functionality is off by default, behind a configuration variable
($wgVectorResponsive) by popular developer demand.
CSS/LESS code by James Hare, with tweaks and testing by Jack Phoenix.
Bug: T46387
Change-Id: Ib611357bbce739b1d193abaf89c228ba52613d6a
Style modules currently added through addModuleStyles default
to being in the head ("top" position). This is an unhealthy default,
since only critical styles that are needed at pageload should be
in the head. In order to be able to switch the default to "bottom",
existing module positions have to be defined explicitly.
Bug: T97410
Change-Id: Ic3d188fe5a833a97027a06cd62c4acef691669bf