On 13 November 2015 at 13:59, Jon Leech <[email protected]> wrote:
> I must be missing something obvious here, but have been poking at sections
> 10.1 and 14.1 of the user guide for some time without making progress. I can
> say
>
> [red]#Some red text#
>
> and that works as expected. But if I say
>
> [role="red"]
> This paragraph should be red.
>
> it is not colored. When I inspect the generated HTML from the
> direct-to-html5 output, it looks like
>
> <div class="openblock red">
> <div class="content">
> <div class="paragraph"><p>This paragraph should be red.</p></div>
> </div></div>
>
> Apparently the CSS "red" style works for the <span> generated from the first
> example, but not the <div> from the second example. If I look in the header
> I see "span.red { color: red; }" CSS, but no div.red CSS - am I supposed to
> create the CSS (and XSL, for Docbook outputs) for this myself?

Basically, yes.  Asciidoc is structural markup, not presentation markup.

In general roles are not pre-defined, but a few for the specific
examples shown in the user guide
http://asciidoc.org/userguide.html#X51 are supported by the default
css.  This support may have been a bad idea in retrospect if it gives
the idea that presentation is part of Asciidoc, but its there now.


> Are there
> examples of applying roles to different types of text and blocks which I
> could refer to?

FAQ #3 is general, and FAQ #62 gives an example of using a role to set
font in XSL. The user guide points to
http://www.sagehill.net/docbookxsl/UsingCSS.html for CSS.

Cheers
Lex

>
> Thanks,
> Jon
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "asciidoc" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/asciidoc.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/asciidoc.
For more options, visit https://groups.google.com/d/optout.

Reply via email to