Skip to content

docs: change inline style example to avoid confusion#43775

Open
wesleyboar wants to merge 2 commits intomdn:mainfrom
wesleyboar:docs/avoid-confusion-with-style-src-attr-example
Open

docs: change inline style example to avoid confusion#43775
wesleyboar wants to merge 2 commits intomdn:mainfrom
wesleyboar:docs/avoid-confusion-with-style-src-attr-example

Conversation

@wesleyboar
Copy link
Copy Markdown
Contributor

Description

On Content-Security-Policy: style-src-attr directive > Examples > Violation cases, change the style attribute value to something that does not use a keyword.

Motivation

I intend to avoid possible confusion. A user might think style-src-attr 'none' blocks <div style="display:none">Foo</div> because it has "none" in the attribute value. (At least one user was confused… me.)

Additional details

N/A

Related issues and pull requests

N/A

User might think `style-src-attr 'none'` blocks `<div style="display:none">Foo</div>` because it has "none" in the attribute value.

So, change the style attribute value to something that does not use a key word.

At least one user was confused… me.
@wesleyboar wesleyboar requested a review from a team as a code owner April 13, 2026 23:29
@wesleyboar wesleyboar requested review from pepelsbey and removed request for a team April 13, 2026 23:29
@github-actions github-actions bot added the Content:HTTP HTTP docs label Apr 13, 2026
@github-actions github-actions bot added the size/s [PR only] 6-50 LoC changed label Apr 13, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 13, 2026

Preview URLs (1 page)

(comment last updated: 2026-04-13 23:32:20)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:HTTP HTTP docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants