Issue #396 wontfix

PATCH: Simplifying sphinx semantic markup roles

tpowers avatartpowers created an issue

For things like :kbd:`F6` that "don’t do anything special except formatting the text in a different style", sphinx currently generates html like this:

 <tt class="kbd docutils literal"><span class="pre">F6</span></tt>

I propose simplifying this to just:

 <span class="kbd">F6</span>

The patch at http://bitbucket.org/tpowers/sphinx/changeset/d4fe9e7df03a does this for the following roles:

    :command:
    :dfn:
    :guilabel:
    :kbd:
    :makevar:
    :program:
    :regexp:

(And adds the required CSS changes to basic.css).

Comments (1)

  1. Georg Brandl

    I've not applied that change; the actual tags are also helpful for browsers or other HTML readers without CSS support. Styling them differently is still possible and very easy with CSS.

  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.