Page MenuHomePhabricator

TextArea: Move CSS overrides to mixin
Closed, ResolvedPublic3 Estimated Story Points

Description

Overview

Codex components with icons use mixins to align the absolutely positioned icon horizontally and/or vertically to its relative parent. Inside the mixin are reusable styles like top, left, right, and transform.

Some examples:

  • TextInput's icons are vertically centered.
  • Combobox's icons are horizontally and vertically centered.

TextArea is a special case because the icons in TextArea are not horizontally or vertically centered. These icons are aligned with the first line of content in the <textarea>. We want to make use of the existing mixin and get rid of any overriding styles in TextArea.

Issue

Overriding mixin styles

Why is this bad?

Overriding mixin styles leads to unnecessary code bloat. (See solution 1 in this article)

Acceptance Criteria

  • Edit the existing mixin, cdx-mixin-icon, to provide more customized styles for aligning icons that will support TextArea
  • Remove overriding styles in TextArea - this includes: top, height, and transform

Resources

Event Timeline

Change 928061 had a related patch set uploaded (by LWatson; author: LWatson):

[design/codex@main] TextArea: Improve mixin usage

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

lwatson updated the task description. (Show Details)
lwatson renamed this task from TextArea: Improve mixin usage to TextArea: Move CSS overrides to mixin.Jun 9 2023, 2:41 PM
lwatson updated the task description. (Show Details)
Restricted Application triaged this task as High priority. · View Herald TranscriptJun 9 2023, 2:48 PM
ldelench_wmf set the point value for this task to 3.Jun 12 2023, 9:15 PM

Change 928061 merged by jenkins-bot:

[design/codex@main] TextArea: Move CSS overrides to mixin

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

Change 931666 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[mediawiki/core@master] Update Codex from v0.12.0 to v0.13.0

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

Test wiki created on Patch demo by ATomasevich (WMF) using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/2c8b23bc31/w

Change 931666 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v0.12.0 to v0.13.0

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

Test wiki on Patch demo by ATomasevich (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/2c8b23bc31/w/