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

Set background color by markdown image syntax #92

Closed
yhatt opened this issue Nov 12, 2018 · 1 comment · Fixed by #113
Closed

Set background color by markdown image syntax #92

yhatt opened this issue Nov 12, 2018 · 1 comment · Fixed by #113
Labels
enhancement New feature or request

Comments

@yhatt
Copy link
Member

yhatt commented Nov 12, 2018

Related to yhatt/marp#252.

Marpit is already supported backgroundColor directive. But when you want to change color in a single page, it requires:

  • A knowledge of difference between local and spot directives
  • A lot of typings
  • Strict YAML formatting
<!-- _backgroundColor: "#def" -->

A suggestion in yhatt/marp#252 is very useful in this case. You may write the color code as like as the background image syntax.

<!-- Color keywords -->
![bg](red)

---

<!-- Hex color -->
![bg](#39ffaf)

It would allow color keywords, transparent, currentColor, and RGB colors with hexadecimal notation #123abc. It has the same behavior to backgroundColor spot directive.

The functional notation like rgb(0, 128, 255) might break Markdown (CommonMark) image syntax by whitespace. To support functionals is no problem, but we should tell this problem to user.

@bdsoftpro

This comment has been minimized.

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

Successfully merging a pull request may close this issue.

2 participants