sphinx icon indicating copy to clipboard operation
sphinx copied to clipboard

please document the rst-class and/or cssclass directive

Open zzzeek opened this issue 5 years ago • 0 comments

Restructured text has a class directive that lets you add a css class to an element. This won't work in Sphinx because it conflicts with the default domain's "class", usually py:class.

Sphinx has already found a solution for this, which is that it redefines docutils Class under cssclass and rst-class.

I found these by source-code diving and purposely breaking docutils "Class" and following where the import errors led me. Otherwise, "rst-class" and "cssclass" are not documented at all except for a passing, unlinked mention of rst-class here.

the "rst-class" directive should be documented at the very least in the domains chapter so that those of us wondering why we can't use RST .. class:: know where to look for the alternative.

zzzeek avatar Sep 17 '20 20:09 zzzeek