Progress bar doesn't work when CSP is applied as it uses inline-styles

Created on 4 September 2025, 18 days ago

Problem/Motivation

If a site happens to disable unsafe- directives for CSP, effectively having the strictest CSP, the progress bar will not load because the default template (core/modules/system/templates/progress-bar.html.twig) uses <div style>

Steps to reproduce

Enable CSP module, or any other method of using CSP, ensure all unsafe- directives are disabled.

Proposed resolution

Do something else that doesnt use `style` attribute.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.2 🔥

Component

CSS

Created by

🇦🇺Australia dpi Perth, Australia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @dpi
  • 🇳🇿New Zealand quietone

    Hi, If this problem was discovered on a version of Drupal that is not 11.x, add that information in the issue summary and leave the version at 11.x. In Drupal core changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies . Thanks.

Production build 0.71.5 2024