Dedicated ticket for the issue I raised in https://phabricator.wikimedia.org/T60137#10414764 onwards.
Use case
- When using MobileFronted, the whole footer is trimmed down. A "Terms of Use" link is removed, but since it is important, it is added back to the remaining footer links.
Problem
- Some CSS is applied to move this link to the first position. That CSS is a float:left, which I itched on.
First attempt at solving
- These two associated patches: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1105977 + https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/1105978
However, the approach of these patches is not satisfying enough.
Next attempts
I suggested two alternatives here: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/1105978/comments/bc634123_2dd654dc
Alternative 1:
Use the following, arguably cleaner, CSS:#footer-place { display: flex; } #footer-places-terms-use { order: -1; }References:
- Is it possible to change the order of list items using CSS3? on Stack Overflow
- Ordering flex items on MDN
- order CSS property on MDN
Alternative 2:
Considering that these footer links are probably seldom used, just don't tweak the order, and make it do with "Terms of Use" coming after "Privacy policy".
- @Jdlrobson stated he does want the "Terms of Use" link to be displayed first. This rules out alternative 2.
- He suggested to consider augmenting the relevant hook, to let tweak the order of the elements (refs message). I'm not sure it would be worth the hassle, and the code complexification (refs message). But for sure, I'm not planning to look into it…
- The remaining solution would be my alternative 1, which makes use of flex's order property.