mapbox / mapbox/mr-ui

Button as child of .prose has blue text

Open
#211 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
90
Forks
5
PR merge metrics
No merged PRs in 30d

Description

image

When Button uses an a element and is a child of .prose, its text shows up as blue on blue. We got around this by passing in passthroughProps with all of the same classes the Button component would use but with unprose added, but this defeats the purpose of using the component.

There were two instances of using this in the help docs, I am not sure if there are others throughout the other docs sites.

It's also possible there's an easier fix I am not aware of, just leaving this here in case we should account for this in mr-ui

Contributor guide

Open the contributing guide

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

Start at the Button component and its anchor rendering, then inspect the two help docs instances that place it inside .prose. Reproduce the blue-on-blue text case and verify that Button styling remains correct without passthroughProps or an added unprose class. Check the other docs sites for similar uses.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.