Skip to content

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

Closed
prests wants to merge 2 commits intoradix-ui:mainfrom
prests:feat/injected-css/optional-export
Closed

feat(injected-css): optionally export css for consumer to import#3131
prests wants to merge 2 commits intoradix-ui:mainfrom
prests:feat/injected-css/optional-export

Conversation

@prests
Copy link
Copy Markdown

@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
@chaance
Copy link
Copy Markdown
Member

chaance commented Sep 27, 2024

I appreciate the contribution and consideration of the tradeoffs here! I'm going to close this PR for now because a) there's a huge backlog I'm trying to clear out, and b) I'm not sure I fully understand the problem and solution at this point. Glad to continue the discussion here to see how we can move forward.

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.

2 participants