This card's purpose is to find an intermediate place for 'wikimedia-ui-base.less' while the related task from 2016 is concluded:
{T123359}
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 ]]
The problem is:
* `@import 'wikimedia-ui-base'` cannot be used in skins and extensions (it's imported to extensions using OOUI, though)
* WMUI Base is not specific to OOUI
I propose copying[[ https://gerrit.wikimedia.org/r/c/mediawiki/core/+/573403/5/resources/src/mediawiki.less/wikimedia-ui-base.less | importing ]] or moving 'wikimedia-ui-base.less' to a folder that's on the include path.: 'core.git/resources/src/mediawiki.less/'
Following Krinkle's comment ([[ https://phabricator.wikimedia.org/T112747#2476747 | phab ]], [[ https://gerrit.wikimedia.org/r/c/mediawiki/core/+/345440#message-b32fb46e5f7ab9efbd7246021decc0b28750b458 | gerrit ]]) the path that could be acceptable is 'core.git/resources/src/mediawiki.less/theme/',This enables using `@import 'wikimedia-ui-base';`
this enables using `@import 'theme/wikimedia-ui-base';`
===== 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. Where to copy/move 'wikimedia-ui-base.less'? Proposed: 'core.git/resources/src/mediawiki.less/theme/'.
2. Copy or move or import from 'core.git/resources/lib/ooui/wikimedia-ui-base.less'?
* I see no reason to duplicate.
* The ooui import path in `resources/Resources.php` can be updated.
* It seems to me `foreign-resources.yaml` wouldn't be able to update it in the 'core.git/resources/src/' folder.
== Current solution
For the time being a trivial, stupid simple patch has been submitted using the "import" solution that avoid the more involved questions about copying or moving and adjusting the tooling. It's a one-liner and enables skins and extensions to use the following in .less files:
`@import 'theme/wikimedia-ui-base';`
https://gerrit.wikimedia.org/r/c/mediawiki/core/+/573403/25/resources/src/mediawiki.less/theme/wikimedia-ui-base.less