Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-77050

Styles with CSS variables in Connect static content macros are stripped - preventing some dark mode support

    XMLWordPrintable

Details

    Description

      Issue Summary

      First reported in The Developer Community. When applying any styles within the body of a static content macro, Confluence is stripping these styles before getting rendered in the page. This sanitization is performed for security purposes, however, in some cases this creates difficulty in the macro supporting Confluence theming.

      This is reproducible on Data Center: No

      Steps to Reproduce

      1. Create a Connect static content macro
      2. In the template for that macro, include custom `style` attributes with valid CSS markup

      Expected Results

      The provided `style` values are rendered within Confluence

      Actual Results

      Custom `style` attributes are stripped from the output and not applied

      Workaround

      Utilize a dynamic content macro which will render in an iframe from where the Connect app is hosted and has complete control over the styles being used

      Attachments

        Issue Links

          Activity

            People

              1eb47195c63d Connor Deyoung
              e83115ee9df5 Alex White
              Votes:
              24 Vote for this issue
              Watchers:
              19 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: