mapbox / mapbox/mr-ui

Add style options to code snippet's `highlightElements`

Open
#6 2 comments 1 reaction 1 assignee View on GitHub

@danswick is already working on this.

Since Jul 24, 2018.

enhancement jira-sync-complete
Dominant language
TypeScript
Stars
90
Forks
5
PR merge metrics
No merged PRs in 30d

Description

The code snippet component's current default style works well for self-contained pages like the mapbox.com install pages:

image

However, the hightlight style is perhaps too subtle for some other use cases. For example, tutorials that need to demonstrate which lines have changes from step to step as the reader scrolls through a single, long page. For these types of use cases, it would be useful to expose an option for a "high contrast" mode or a prop for specifying CSS classes to be passed to [highlightElements](https://github.com/mapbox/mr-ui/blob/master/src/components/code-snippet/code-snippet.js#L284).

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.