yhatt/marp

set image background color

roipoussiere opened this issue ยท 4 comments

The very useful ![bg](path) tag could be improved to support colors instead of images:

  • [bg](red): color keyword, among the html colors list;
  • [bg](#39ffaf): color in hexadecimal representation.
yhatt commented

Nice shorthand for using a custom background color ๐Ÿ˜„
I think it has a great value for implementation to Marp Next.

By the way, is it possible to set a background image on all slides in one line, using the current Marp?

Found it!

<style>
.slide {
  background-image: url("background.jpg") !important;
  background-size: cover;
}
</style>
yhatt commented

Marpit framework, the base framework of Marp Next, has implemented this feature! It would be available on Marp Core and Marp CLI soon.

https://marpit.marp.app/image-syntax?id=background-color