openlibhums / openlibhums/memory-alpha

Standardize color keyword arguments in components

Open
#108 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dev-ready refactoring size S
Dominant language
Markdown
Stars
0
Forks
0
Avg merge
4d 14h
Merged PRs (30d)
2

Description

Description or user story

Steph has come up with a set of utility classes, currently living in button.css, that allow a component to take color information from the caller and reliably produce accessible contrasts. The way it's structured encourages using only the colors we have established in the scheme, because both foreground and background color are used in the class.

Proposed solution

I think we should move this to utilities.css, get rid of best_foreground, and refactor the page section component (and others, though I think it's just the George splash?) to use this.

We should also consider whether the border color can be set with this utility, since it is especially useful in our style for button borders to have the same color as text.

Alternatives

Keeping the current two solutions in the codebase and getting confused between them.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the utility classes in button.css with the page section component and the George splash usage, then inspect utilities.css and references to best_foreground. Move the shared color utility into utilities.css, refactor the identified components to use it, and determine whether border color belongs in the utility; done means the duplicate approaches are removed and existing component styling remains consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
design, frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.