Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add style options to code snippet's highlightElements #6

Open
danswick opened this issue Jul 24, 2018 · 2 comments
Open

Add style options to code snippet's highlightElements #6

danswick opened this issue Jul 24, 2018 · 2 comments
Assignees
Labels
enhancement New feature or request jira-sync-complete

Comments

@danswick
Copy link
Contributor

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).

@danswick danswick added the enhancement New feature or request label Jul 24, 2018
@danswick danswick self-assigned this Jul 24, 2018
@davidtheclark
Copy link
Contributor

Good point, @danswick. I do wonder if the same critique could be applied to the install flow right now — so if we want to increase the contrast for tutorials we should do the same for the install flow. That would mean changing the defaults instead of adding a new option.

@danswick
Copy link
Contributor Author

per a suggestion from @colleenmcginnis, it would also be helpful to display line numbers in the highlightElements blocks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request jira-sync-complete
Projects
None yet
Development

No branches or pull requests

3 participants