From: Thyfate <app...@ho...> - 2013-12-13 19:40:11
|
Hi to all, I am using RestructuredText to generate the page contents of my website using the :class: directive to add styles to elements. However, I cannot use the animation css classes from https://daneden.me/animate/ because the css class names are camelcased and docutils converts the class names to lowercase. Is there an easy way to prevent this behavior ? Thanks in advance! |
From: Guenter M. <mi...@us...> - 2013-12-17 07:58:08
|
On 2013-12-13, Thyfate wrote: > Hi to all, > I am using RestructuredText to generate the page contents of my website > using the :class: directive to add styles to elements. However, I > cannot use the animation css classes from https://daneden.me/animate/ > because the css class names are camelcased and docutils converts the > class names to lowercase. > Is there an easy way to prevent this behavior ? Unfortunately not. Class arguments are normalized to conform to the regular expression [a-z](-?[a-z0-9]+)* by converting alphabetic characters to lowercase, accented characters to the base character, non-alphanumeric characters to hyphens, consecutive hyphens into one hyphen. http://docutils.sourceforge.net/docs/ref/rst/directives.html#class Options are: * Use a local copy of the css stylesheet with lowercase class names, * post-process the html file, * use raw HTML (ugly), * modify the docutils code (find out where the normalization is done, write an normalization function that skips the downcasing, call this function instead of the default one in the "class" directive or wherever it is called, ... ), * ...(?) Günter |