Page MenuHomePhabricator

Remove outdated Codex button and Vector icon margin-right gap addition in Vector, MobileFrontend and MinervaNeue
Closed, ResolvedPublic2 Estimated Story Points

Description

Background

When Vector icons were married to Codex buttons more than 2 years ago, Codex buttons haven't had ability to provide gap between icon and label with Vector icons.
Hence

.cdx-button:not( .cdx-button--icon-only ) .vector-icon {
	// Add spacing between icon and text
	margin-right: @spacing-35;
}

made it into Vector's Button.less.

Fast-forward two years of Codex development, the gap is now provided by Flexbox gap baked in.
Now we've got a duplication of spacing which leads to confusion and a usability issue, specifically in quiet buttons.

image.png (510×1 px, 45 KB)

2025-09-08
QTE's @Edtadros was identifying another leftover margin, the spacing between userAvatar and dropdown icon is a custom set one in Vector from times before the Codex buttons had spacing integrated.
The distance between the icon and the dropdown arrow, even though one interaction object, is bigger than the distance to the other elements

image.png (1×1 px, 235 KB)

Requirement

Remove the outdated margin-right gap styling applied to Vector icons within Codex buttons in Vector, MobileFrontend, and MinervaNeue, as the current Codex implementation now provides spacing via Flexbox. Ensure that removing this rule does not introduce any layout or usability regressions.

BDD

Feature: Remove outdated Vector icon margin-right rule from Codex buttons

  Scenario: No regression in button appearance across skins
    Given Codex buttons in Vector, MobileFrontend, and MinervaNeue
    When viewing buttons in all supported states and variants
    Then the layout, alignment, and spacing remain visually correct

Test Steps

Test Case 1: Check appearance across skins

  1. View the same button in Vector skin, MobileFrontend, and MinervaNeue.
  2. Inspect all button states (default, hover, active, disabled, quiet).
  3. AC1: The layout and spacing are correct in all skins and button states.

QA Results - Beta

ACStatusDetails
1T401359#11081060

QA Results - Prod

ACStatusDetails
1T401359#11109285

Acceptance criteria for done

  • Remove the margin-right gap rule to result in

image.png (522×1 px, 45 KB)

  • Test if there are no side-effects removing this

Event Timeline

Change #1176332 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/skins/Vector@master] styles: Remove Codex override for Button and `vector-icon` combo gap

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

Volker_E set the point value for this task to 1.Aug 7 2025, 9:54 PM

thanks @Volker_E for filing this. The current spacing between the icon and label makes them look like two separate buttons so it will be great if we can find a way to fix this make it look more cohesive.

Change #1177485 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/MinervaNeue@master] styles: Remove Codex override for Button and `minerva-icon` combo gap

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

Change #1176332 merged by jenkins-bot:

[mediawiki/skins/Vector@master] styles: Remove Codex override for Button and `vector-icon` combo gap

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

Change #1177496 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/extensions/MobileFrontend@master] Remove unnecessary Codex button overrides, and remove 'block'/'stacked' button case from anon edit overlay

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

Volker_E renamed this task from Remove outdated Codex button and Vector icon margin-right gap addition in Vector to Remove outdated Codex button and Vector icon margin-right gap addition in Vector, MobileFrontend and MinervaNeue.Aug 11 2025, 8:31 PM
Volker_E changed the point value for this task from 1 to 2.

Change #1177485 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] styles: Remove Codex override for Button and `minerva-icon` combo gap

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

Change #1178063 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/extensions/MobileFrontend@master] Remove unnecessary Codex button overrides

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

Change #1178063 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Remove unnecessary Codex button overrides

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

Edtadros removed Edtadros as the assignee of this task.EditedAug 13 2025, 5:05 AM
Edtadros subscribed.

Test Result - Beta

Status: ✅ PASS

Test Steps

Test Case 1: Check appearance across skins

  1. View the same button in Vector skin,, and Minerva.
  2. Inspect all button states (default, hover, active, disabled, quiet).
  3. AC1: The layout and spacing are correct in all skins and button states.

Everything looks good. I didn't see any margin-right on any of the icons themselves. I've included images in Prod for comparison.

Vector:

screenshot 30.png (485×1 px, 164 KB)

screenshot 31.png (608×1 px, 338 KB)

Minerva:

screenshot 32.png (624×1 px, 150 KB)

screenshot 33.png (718×1 px, 319 KB)

This (or actually a too blurry implementation of Codex CSS-only button classes) has caused T401361: Minerva icon spacing issue - Watch and View Source.

Volker_E claimed this task.

Test Result - Prod

Status: ❓Need More Info
Environment: enwiki
OS: macOS Sequoia 15.6
Browser: Chrome Canary (latest as of test date)
Device: MS
Emulated Device: NA

Test Steps

Test Case 1: Check appearance across skins

  1. View the same button in Vector skin,, and Minerva.
  2. Inspect all button states (default, hover, active, disabled, quiet).
  3. AC1: The layout and spacing are correct in all skins and button states.

Everything looks good. There is still a margin-right on Vector however, so I'm not sure if this is what was expected.

❓ Vector:

screenshot 40.png (1×1 px, 401 KB)

✅ Minerva:

screenshot 41.png (1×1 px, 495 KB)

Edtadros updated the task description. (Show Details)
Volker_E updated the task description. (Show Details)
Jdlrobson-WMF subscribed.

I'm not sure what the remaining work is here. Please open a new task if there is remaining work relating to Edward's test in T401359#11109285

Note: reopening tasks in archived sprints get lost in the Phabricator void!