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

Unable to change color of admonition (block) title #561

Closed
ctargett opened this issue Sep 16, 2016 · 3 comments
Closed

Unable to change color of admonition (block) title #561

ctargett opened this issue Sep 16, 2016 · 3 comments
Assignees
Milestone

Comments

@ctargett
Copy link

When an admonition block has a title, the color of the title is green. I'd like to change to match our scheme. I see from https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc#block that we can set the font-color, but assume that will make the entire block that color, when I only want to modify the title.

I tried:

admonition:
  title:
     font-color: '#7a2518'

and

block:
  title:
     font-color: '#7a2518'

Am I missing a syntax?

@mojavelinux
Copy link
Member

mojavelinux commented Sep 16, 2016

It's not possible at the moment to style block titles (aka captions) individually. You can control all block titles using the top-level caption key:

caption:
  font_color: #7a2518

Note that this will affect all block titles, including paragraphs, tables, examples, images, lists, listings, and, of course, admonitions.

In the future, we'll probably need to add a subkey to each block type to control the caption individually.

@ctargett
Copy link
Author

I was going to say that the caption isn't working, but then noticed that Atom has been putting extra spaces in my lines in the theme.yml file :-(

Fixed that and it's working now. I can live with the caption option until more options are available. Thanks!

@mojavelinux
Copy link
Member

This was almost solved by #307, but we missed the admonition category. I'll go ahead and extend that change to support admonition blocks as well.

Keep in mind the caption for all admonition blocks will share the same styles. In other words, it wouldn't be possible to set different properties per admonition type.

@mojavelinux mojavelinux self-assigned this Oct 31, 2019
@mojavelinux mojavelinux added this to the v1.5.0 milestone Oct 31, 2019
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Oct 31, 2019
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Oct 31, 2019
@mojavelinux mojavelinux modified the milestones: v1.5.0, v1.5.0.beta.8 Nov 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants