Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-78619

Code block is not rendering in Dark Theme

XMLWordPrintable

      Issue Summary

      The text formatting for code blocks is not rendering properly in Dark Theme. 
      It works as expected in Original/Light Theme. 

      Steps to Reproduce

      1. Using the formatting provided in this article;
        {code:xml}
            <test>
                <another tag="attribute"/>
            </test>
        
      2. Open a Jira issue and type the code block on the Description or Comment field;

      Expected Results

      The code block should be rendered properly like this (this is from Light Theme);

      Actual Results

      In Dark Theme, the code block shows like this;

      Workaround

      A workaround is to add custom CSS rule through the announcement banner;

      1. Configure announcement banner with the following custom CSS rule;
        <style>
        .code-tag {
           color: var(--ds-text-accent-teal, #000091);
        }
        </style>

      2. Add the code block in either Description/Comment field;
        {code:xml}
            <test>
                <another tag="attribute"/>
            </test>
        {code}

      3. The result would be like this;

       

        1. image-2025-02-20-14-35-29-971.png
          165 kB
          Cecille Maquito
        2. image-2025-02-20-14-37-22-717.png
          20 kB
          Cecille Maquito
        3. image-2025-02-20-14-38-40-317.png
          165 kB
          Cecille Maquito
        4. screenshot-1.png
          119 kB
          Cecille Maquito
        5. screenshot-2.png
          34 kB
          Cecille Maquito
        6. screenshot-3.png
          113 kB
          Cecille Maquito

              Unassigned Unassigned
              02a6ae09c2cc Cecille Maquito (Inactive)
              Votes:
              5 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: