Re: What AsciiDoc syntax outputs inline CSS?

Posted by David Jencks on
URL: https://discuss.asciidoctor.org/What-AsciiDoc-syntax-outputs-inline-CSS-tp8207p8208.html

Awful as it is, you may get more/better advice on the asciidoctor gitter channel.

I’m slightly surprised width turns into an inline style.  I think all the other things you mention are handled in the stylesheet.  I’d suggest you investigate roles; these turn into classes in the html and you can then style them in the stylesheet.

David Jencks

On Sep 2, 2020, at 9:09 AM, wesruv [via Asciidoctor :: Discussion] <[hidden email]> wrote:

Hiya, I'm working to make Red Hat product documentation templates as slick as possible for web presentation.

One thing we've run into is inline CSS getting added in certain contexts that doesn't end well on small breakpoints. I'm trying to create guidance for the authors on what to avoid, but I'm having a hard time finding what AsciiDoc syntax will create inline styles.

The syntax that brought this up was:

[[table-variable-names-differences-between-ansible-2.1-and-2.2]]
.Differences in Variable Names Between Ansible 2.1 and 2.2 
[width="40%",frame="topbot",options="header"]

It created something like:
<table style="width: 40%">

Which does very poorly at 320px wide screens <img class="smiley" src="x-msg://12/images/smiley/smiley_unhappy.gif">

The docs didn't seem to have anything specific I could find, is there something I can search for in the AsciiDoc parsing code to find what results in inline styles? I'm not familiar with Ruby, but if I can get a lead on what to look for I'm sure I can parse the relevant parts.

I'm most considered with things like width, margin, padding, border, font/background color. Anywhere AsciiDoc adds CSS classes I'm happy with, just worried about style attributes.

Thanks for your time!


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/What-AsciiDoc-syntax-outputs-inline-CSS-tp8207.html
To start a new topic under Asciidoctor :: Discussion, [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML