Page MenuHomePhabricator

Remove deprecated `.horizontal-gradient()` and `vertical-gradient()` mixins from MediaWiki core
Closed, ResolvedPublic

Description

Background

MediaWiki core currently includes Less mixins .horizontal-gradient() and vertical-gradient() that were originally added to simplify the use of horizontal gradients across browsers due to vendor prefixes. At the time of introduction, this abstraction helped handle inconsistencies in vendor implementations of CSS gradients.

As of MediaWiki 1.43, this mixin has been explicitly marked as deprecated with a note to use linear-gradient directly. All major browsers have long supported unprefixed gradients, making the mixin redundant. Keeping it in MediaWiki core creates unnecessary technical debt and risks developers continuing to rely on deprecated abstractions instead of standard CSS.

CodeSearch

Goal

  • Identify and confirm all current usages of .horizontal-gradient() and .vertical-gradient() within MediaWiki core and bundled skins/extensions.
  • Replace any existing calls to the mixins with direct linear-gradient( to right, … ) declarations.
  • Remove the mixin definition file from MediaWiki core.
  • Ensure that no regressions occur in styles that previously relied on these helpers.

Acceptance criteria for done

  • All references are replaced with direct CSS standard linear-gradient() usage.
  • .horizontal-gradient() and .vertical-gradient() mixin are removed from 'mediawiki.mixins.less'.
  • No styling regressions are introduced in MediaWiki core, or bundled skins and extensions.

Event Timeline

Change #1187667 had a related patch set uploaded (by Hemmnt; author: Hemmnt):

[mediawiki/core@master] T403692: Remove deprecated .horizontal-gradient() and .vertical-gradient() mixins from MediaWiki core

https://gerrit.wikimedia.org/r/1187667

Changes is done Review the Patch

@Hemmanttt Please do not post a patch review comment two minutes after an automated patch review comment. Thanks.

Change #1187667 had a related patch set uploaded (by Hemmnt; author: Hemmnt):

[mediawiki/core@master] Remove deprecated gradient mixins from core

https://gerrit.wikimedia.org/r/1187667

Review the patch please and update me. its been 1 week already.

Patches to MediaWiki routinely languish for weeks to months without review, and occasionally languish for years. Please be patient.

Change #1194819 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/RevisionSlider@master] Replace deprecated .vertical-gradient() mixin

https://gerrit.wikimedia.org/r/1194819

Change #1194953 had a related patch set uploaded (by Jon Harald Søby; author: Jon Harald Søby):

[mediawiki/skins/Metrolook@master] Remove gradient mixins

https://gerrit.wikimedia.org/r/1194953

Change #1194955 had a related patch set uploaded (by Jon Harald Søby; author: Jon Harald Søby):

[mediawiki/extensions/VisualEditor@master] Remove gradient mixins

https://gerrit.wikimedia.org/r/1194955

Change #1194953 merged by jenkins-bot:

[mediawiki/skins/Metrolook@master] Remove gradient mixins

https://gerrit.wikimedia.org/r/1194953

Change #1194819 merged by jenkins-bot:

[mediawiki/extensions/RevisionSlider@master] Replace deprecated .vertical-gradient() mixin

https://gerrit.wikimedia.org/r/1194819

Change #1195166 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/VisualEditor@master] Replace deprecated .vertical-gradient() mixin

https://gerrit.wikimedia.org/r/1195166

Change #1195166 abandoned by Thiemo Kreuz (WMDE):

[mediawiki/extensions/VisualEditor@master] Replace deprecated .vertical-gradient() mixin

Reason:

Duplicate, see Ie5b5f8b.

https://gerrit.wikimedia.org/r/1195166

Change #1195169 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/RevisionSlider@master] Remove now unused LESS mixin

https://gerrit.wikimedia.org/r/1195169

Change #1194955 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] styles: Remove gradient mixins

https://gerrit.wikimedia.org/r/1194955

Change #1195169 merged by jenkins-bot:

[mediawiki/extensions/RevisionSlider@master] Remove now unused Less mixin

https://gerrit.wikimedia.org/r/1195169

Change #1195371 had a related patch set uploaded (by Jon Harald Søby; author: Jon Harald Søby):

[mediawiki/skins/BlueSky@master] styles: Use native CSS instead of mixin for gradients

https://gerrit.wikimedia.org/r/1195371

Change #1195372 had a related patch set uploaded (by Jon Harald Søby; author: Jon Harald Søby):

[mediawiki/skins/GreyStuff@master] styles: Replace gradient mixin with native CSS

https://gerrit.wikimedia.org/r/1195372

Change #1195374 had a related patch set uploaded (by Jon Harald Søby; author: Jon Harald Søby):

[mediawiki/skins/Splash@master] styles: Replace gradient mixin with native CSS

https://gerrit.wikimedia.org/r/1195374

I think that's all of them. The final repo listed in codesearch, DarkVector, is marked as archived, so it's not possible to submit a pull request (or even an issue) in it.

Change #1195372 merged by jenkins-bot:

[mediawiki/skins/GreyStuff@master] styles: Replace gradient mixin with native CSS

https://gerrit.wikimedia.org/r/1195372

Change #1195374 merged by jenkins-bot:

[mediawiki/skins/Splash@master] styles: Replace gradient mixin with native CSS

https://gerrit.wikimedia.org/r/1195374

I think that's all of them.

Great, thanks for the work here!

Change #1195371 merged by jenkins-bot:

[mediawiki/skins/BlueSky@master] styles: Use native CSS instead of mixin for gradients

https://gerrit.wikimedia.org/r/1195371

Change #1187667 merged by jenkins-bot:

[mediawiki/core@master] mediawiki.less: Remove .horizontal-gradient() and .vertical-gradient() mixins

https://gerrit.wikimedia.org/r/1187667

Keeping this open for a week to see if we have non-captured usages left open – don't expect any, but for completion.

Volker_E updated the task description. (Show Details)

Keeping this open for a week to see if we have non-captured usages left open – don't expect any, but for completion.

Whoops, a lil longer than a week. :)