Hacker News new | ask | show | jobs
by saltymimir 1320 days ago
In my (admittedly) brief experience dabbling with asciidoc, I really don't like the opinionated approach on how styles should be injected to the generated HTML output.

Say that I generate a table using asciidoc's built-in syntax, the output will always generate HTML elements with the CSS classes already defined:

    <table class="tableblock frame-all grid-all stretch">
      <colgroup>
        <col style="width: 50%;">
        <col style="width: 50%;">
      </colgroup>
      <thead>
        <tr>
          <th class="tableblock halign-left valign-top">Column heading 1</th>
          <th class="tableblock halign-left valign-top">Column heading 2</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td class="tableblock halign-left valign-top"><p class="tableblock">Column 1, row 1</p></td>
         <td class="tableblock halign-left valign-top"><p class="tableblock">Column 2, row 1</p></td>
        </tr>
        <tr>
          <td class="tableblock halign-left valign-top"><p class="tableblock">Column 1, row 2</p></td>
          <td class="tableblock halign-left valign-top"><p class="tableblock">Column 2, row 2</p></td>
        </tr>
      </tbody>
    </table>
For me, this output is needlessly verbose for a setup that uses nothing but default flags. Worse, it doesn't provide much of a leeway to change the classes or even let me use some other ways to style the elements.

I prefer markdown's (and markdoc's) approach to styling, in that it doesn't really try to define any. My take on this is that stylings of the output should be be coupled with the toolings, as opposed to being bolted into the language standards.

edit: formatting