Skip to content

Remove unsafe inline styles in favour of creating classes #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
troyhunt opened this issue Apr 12, 2025 · 2 comments · Fixed by #108
Open

Remove unsafe inline styles in favour of creating classes #105

troyhunt opened this issue Apr 12, 2025 · 2 comments · Fixed by #108
Assignees

Comments

@troyhunt
Copy link
Contributor

Just noticed we've got some unsafe inline styles:

Image

By default, these are blocked when we have a content security policy: https://content-security-policy.com/examples/allow-inline-style/

Let's move these over to the style sheet for existing and future styling.

@stebet
Copy link
Collaborator

stebet commented Apr 16, 2025

@indyber I found a few of those in the new Pwned Passwords page as well

@troyhunt
Copy link
Contributor Author

troyhunt commented May 9, 2025

Opening this back up as we still have quite a few instances of this. I was trying to work out why things like the circles behind the steps on the notification page looked odd, then I saw the console:

Image

@indyber given how close we are to launch, if this is a big job then we can always allow unsafe inline for a limited period then fix it shortly after. I'll let you make the call on this, but I think you need to do a "find all" for "style=" as there are still a few of them around. Let's make a fast call on whether we fix them now or allow unsafe inline for a bit.

@troyhunt troyhunt reopened this May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants