Skip to content
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

Remove inline CSS in SVG logo #20814

Merged
merged 1 commit into from Dec 15, 2022
Merged

Remove inline CSS in SVG logo #20814

merged 1 commit into from Dec 15, 2022

Conversation

luxiaba
Copy link
Contributor

@luxiaba luxiaba commented Nov 15, 2022

Move inline css style="color:#fff" in svg logo to mastodon/basics.scss to comply with Content Security Policy, otherwise there are some "Refused to apply" errors in production env like below:

image

@ClearlyClaire
Copy link
Contributor

ClearlyClaire commented Nov 15, 2022

These can probably be dropped altogether rather than moved, as the logos currently work fine with the CSP blocking those styles.

@luxiaba
Copy link
Contributor Author

luxiaba commented Nov 15, 2022

Yes it is, you reminded me thank you🤩

@luxiaba luxiaba changed the title Move inline-css in logo to mastodon/basics.scss to ensure match with CSP policy Dropped inline-css in logo Nov 15, 2022
@ClearlyClaire ClearlyClaire changed the title Dropped inline-css in logo Remove inline CSS in SVG logo Nov 15, 2022
@ineffyble ineffyble added the bug Something isn't working label Nov 16, 2022
@Gargron
Copy link
Member

Gargron commented Nov 17, 2022

The inline style is there for when/if somebody uses the logo file standalone.

@luxiaba
Copy link
Contributor Author

luxiaba commented Nov 17, 2022

How about filling the color #FFF directly into the path?

@MaciekBaron
Copy link
Contributor

No, the path currently uses currentColor so that it can be overridden by a color definition. The use approach allows defining a default colour (white / #FFF). Probably best to just include the hash in the CSP for this purpose.

@Gargron Gargron merged commit 8f8c0fe into mastodon:main Dec 15, 2022
neatchee pushed a commit to neatchee/mastodon that referenced this pull request Dec 16, 2022
nametoolong pushed a commit to nametoolong/nuage that referenced this pull request Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants