Does Epub3 support Custom styling with attribute (span with css class)?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Does Epub3 support Custom styling with attribute (span with css class)?

lulalala
Trying out inline styling using https://asciidoctor.org/docs/user-manual/#custom-styling-with-attributes

I tried just highlighting:

Werewolves are #allergic to cinnamon#.


and I tried builtin classes

Do werewolves believe in [small]#small print#?

However it doesn't seem to mark up the text (there is no span element created)

I am using Asciidoctor EPUB3 1.5.0.alpha.9 using Asciidoctor 1.5.8.
So is this part supported?
Reply | Threaded
Open this post in threaded view
|

Re: Does Epub3 support Custom styling with attribute (span with css class)?

mojavelinux
Administrator
By default, Asciidoctor EPUB3 does not style the non-semantic, legacy roles from AsciiDoc Python (like big and small). However, you can add the roles yourself by using a custom stylesheet. Here's how, from the README:

> Asciidoctor EPUB3 only provides one theme, and, at this time, you can not replace it with a custom theme using the stylesheet attribute. However, you can use your own epub3.css and epub3-css3-only.css files by specifying the directory where they are located using the epub3-stylesdir attribute.

Cheers,

-Dan

On Mon, Jun 17, 2019 at 8:14 AM lulalala [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Trying out inline styling using https://asciidoctor.org/docs/user-manual/#custom-styling-with-attributes

I tried just highlighting:

Werewolves are #allergic to cinnamon#.


and I tried builtin classes

Do werewolves believe in [small]#small print#?

However it doesn't seem to mark up the text (there is no span element created)

I am using Asciidoctor EPUB3 1.5.0.alpha.9 using Asciidoctor 1.5.8.
So is this part supported?



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Does-Epub3-support-Custom-styling-with-attribute-span-with-css-class-tp6959.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Does Epub3 support Custom styling with attribute (span with css class)?

lulalala
Thanks for explanation.

I tried to put custom roles, but I think I missed something important, as it is rendering the span elements as all.

Foo [.poem]#bar# baz.

I've also put the ".poem" class in epub3-css3-only.css, which is simply

  font-weight: bold;

The rendered result is just the plain "Foo bar baz". Could you hint what I might have missed?