Title: Additional CSS class
Last modified: June 15, 2019

---

# Additional CSS class

 *  Resolved [rgfactory](https://wordpress.org/support/users/rgfactory/)
 * (@rgfactory)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/additional-css-class-2/)
 * Hi Thomas,
 * it’s me again.
 * When I add an additional CSS class to a Katex block from the admin menu, it breaks
   the block rendering on the post editor page.
    Moreover, the css class is not 
   added in the html code.
 * I use WordPress 5.2.1 and the last version of your plugin.
 * Thanks in advance.
 * See you !
 * PS: I hope this time I have found a real bug…:p

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Tom Churchman](https://wordpress.org/support/users/beskhue/)
 * (@beskhue)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/additional-css-class-2/#post-11641292)
 * Hi rgfactory,
 * Thanks for the report. I can confirm the class is erroneously removed when the
   formula is rendered in posts.
 * I also see the class _is_ added in the editor; but it is added around the entire
   block in the editor and not just around the rendered formula. This probably causes
   the breakage you’re experiencing. It makes more sense to add the class only to
   the rendered formula, in the same way it would show in posts.
 * I’ll find some time to fix this.
 *  Plugin Author [Tom Churchman](https://wordpress.org/support/users/beskhue/)
 * (@beskhue)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/additional-css-class-2/#post-11641443)
 * I am testing a new version of the plugin which adds the support for CSS classes
   you’re looking for. I would be grateful if you could test this version on your
   site and report back, before this version is pushed to other users. Based on 
   my tests, I think it should be good to go as is.
 * You can download it at the bottom of the page here, be sure to select “Development
   Version”:
 * [https://wordpress.org/plugins/katex/advanced/](https://wordpress.org/plugins/katex/advanced/)
 * Note the compatibility notice in the changelog:
 * > Support adding CSS classes to KaTeX Gutenberg Blocks to help with styling. 
   > Backwards compatibility note: KaTeX Gutenberg Blocks are now rendered wrapped
   > in a `div` element on which classes `wp-block-katex-display-block` and `katex-
   > eq` are set. You can add more classes to this `div` through WordPress’s post
   > editor. Previously, KaTeX Gutenberg Blocks were rendered wrapped in an unclassed`
   > span`. KaTeX shortcodes are still wrapped inside a `span` with only the class`
   > katex-eq` set. If you depend on old behavior for styling, you might need to
   > update your styling rules.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Additional CSS class’ is closed to new replies.

 * ![](https://ps.w.org/katex/assets/icon.svg?rev=1993573)
 * [KaTeX](https://wordpress.org/plugins/katex/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/katex/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/katex/)
 * [Active Topics](https://wordpress.org/support/plugin/katex/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/katex/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/katex/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Tom Churchman](https://wordpress.org/support/users/beskhue/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/additional-css-class-2/#post-11641443)
 * Status: resolved