callstack / callstack/linaria

support feature linke `StyleSheetManager` in styled-components

Open
#1,410 0 comments 1 reaction 0 assignees View on GitHub
feature: proposal 💬 needs: triage 🏷
Dominant language
TypeScript
Stars
12.4k
Forks
413
PR merge metrics
No merged PRs in 30d

Description

# repo https://github.com/yzqbugs/linaria-feat
## Describe the feature

so we could provide a StyleSheetManager to set where to put our style in, like [StyleSheetManager](https://styled-components.com/docs/api#stylesheetmanager)
## Motivation
all styles are generated in global scope. It's not usable for shadowDom,if we could provide a styleSheetManager to tell linaria to inject css to shadowdom element,all styles will take effect

below is my code, showing use styleSheetManager in shadowDom

https://github.com/yzqbugs/linaria-feat/blob/364eaadf133818ad59030fd567669a19850dbc2b/src/main.tsx#L1-L59

![image](https://github.com/callstack/linaria/assets/20037151/2eafcc96-f5b9-496d-b7b7-935803cdfb99)

we could see styled-components generate style beside dom, so styles could take effect
## Possible implementations

## Related Issues
#496

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.