linaria icon indicating copy to clipboard operation
linaria copied to clipboard

support feature linke `StyleSheetManager` in styled-components

Open yzqdev opened this issue 1 year ago • 0 comments

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

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

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

Possible implementations

Related Issues

#496

yzqdev avatar May 04 '24 08:05 yzqdev