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

feat(injected-css): optionally export css for consumer to import #3131

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

prests
Copy link

@prests prests commented Sep 20, 2024

Description

This is a POC for removing all of the inline styles for CSP safe alternatives. This is tied to this discussion.

This converts inline styles into css class equivalents, and exports them as part of the npm package. The idea is that consuming apps would import these css files as part of their build. I left this as a progressive enhancement where by providing skipStyleInjection it's assumed you're importing these CSS files, but consumers who are not can still use the injected inline styles.

Looking for input on how to have one source of truth between the css file and the inline styles. I don't think there's an easy way to do it but was hoping to not have to change two places at once.

@prests prests marked this pull request as ready for review September 20, 2024 21:26
@prests prests changed the title [WIP] feat(injected-css): optionally export css for consumer to import feat(injected-css): optionally export css for consumer to import Sep 20, 2024
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 this pull request may close these issues.

1 participant