This card's purpose is to find a way to import 'wikimedia-ui-base.less' in projects that use it (skins, extensions).
Former stalled approach: {T123359}
==== The problem
* `@import 'wikimedia-ui-base'` cannot be used in skins and extensions (it's imported to some extensions using OOUI, though)
* WMUI Base is not specific to OOUI
==== Status quo
Currently, there's a copy of [[ https://github.com/wikimedia/mediawiki/blob/master/resources/lib/ooui/wikimedia-ui-base.less | wikimedia-ui-base.less in core ]] in the 'ooui' library.
Related task: {T176964}
Patch that added it: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/372904
There's a task that updates it: [[ https://github.com/wikimedia/mediawiki/blob/59eda4e114785bb3c1b586d3de7ad599095474f7/resources/lib/foreign-resources.yaml#L260 | resources/lib/foreign-resources.yaml ]]
==== Worth considering
Krinkle's comment ([[ https://phabricator.wikimedia.org/T112747#2476747 | phab ]], [[ https://gerrit.wikimedia.org/r/c/mediawiki/core/+/345440#message-b32fb46e5f7ab9efbd7246021decc0b28750b458 | gerrit ]]).
In T123359#3082435 JdlRobson said:
> Ideally, a consumer should import this by doing `@import 'wikimedia-ui'`
T112747#4093591
==== Questions
1. Should we split 'wikimedia-ui-base' from OOUI in core/src/lib/ ? [[ https://gerrit.wikimedia.org/r/c/mediawiki/core/+/579858 | Patch 579858 ]]
* This requires updating the ooui import path in 'resources/Resources.php'.
* And the updater in `foreign-resources.yaml`.
==== Current solution
[[ https://gerrit.wikimedia.org/r/c/mediawiki/core/+/573403 | Patch 573403 ]] resources: Enable importing 'wikimedia-ui-base.less' in skins, extensions
Can be used directly by: `@import 'mediawiki.theme/wikimedia-ui-base'`;
However, the preferred way to use it is: `@import 'mediawiki.theme/variables'`;
which imports the active skin's theme variables.