quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.96k stars 327 forks source link

Is it possible to set the callouts background opacity and text color? #556

Open sjardim opened 2 years ago

sjardim commented 2 years ago

Hi folks!

First of all, thank you for this great system! I've been testing Quadro and I'd like to suggest 2 modifications to the Callouts options, to enable better control when generating a custom dark mode (both HTML and PDF):

  1. Add an option to customize the background color opacity for the entire callout and also its title. Reference: /src/resources/filters/quarto-pre/callout.lua#L302 /src/resources/filters/quarto-pre/callout.lua#L303 /src/resources/filters/quarto-pre/callout.lua#L351

  2. Add the coltext to the options and also attribute it to a variable.

If you prefer this suggestion as a PR, please let me know. :)

Thank you, Sergio

dragonstyle commented 2 years ago

Hi Sergio,

This is a great suggestion- if you would like to try making a PR for it, we would appreciate it very much.

Here are the details on contributing via PR (note our request for a contributor agreement): https://quarto.org/about.html#pull-requests

For callouts in particular, we support them in PDF/TeX, HTML, Docx, RevealJS, and ePub, so ideally the PR would make the options consistent and accessible across all of those formats...

Charles

sjardim commented 2 years ago

Hi Charles,

Great! Never used Lua before but I think I can do it. :) Will get back to you in a few days.

Thank you!

athulsudheesh commented 2 years ago

@sjardim...while you are at it can you also please please please add option to create new callout blocks with custom colors for the background also....

sjardim commented 2 years ago

@sjardim...while you are at it can you also please please please add option to create new callout blocks with custom colors for the background also....

To be able to create new ones it's a little outside of scope, I'm afraid. But I'll try it!