Ability to provide app css from a component
See original GitHub issueI just came across jest-preview and it’s amazing! We use emotion and it’s really sweet how great our components look with basically 2 minutes of work.
One thing that’d be great is the ability to provide our app-level CSS, which for us is still injected by emotion, but in our top index.tsx
file, i.e.:
ReactDOM.render(
<ApolloProvider client={apolloClient}>
<Router>
<CssBaseline />
<CssReset />
<App />
</Router>
</ApolloProvider>,
document.getElementById("root"),
);
The docs (which are great) have examples of adding root-/app-level externalCss
from bootstap.min.css
files; is there a way to do this same sort of externalCss
but by pointing jest-preview
at a React component that includes our CssBaseline
and CssReset
?
Thanks!
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How to Style Your React App – 5 Ways to Write CSS in 2021
When it comes to styling your React app, you have a ton of different options. Which do you choose? I have broken down...
Read more >CSS Element - Power Apps | Microsoft Learn
CSS describes how code components are to be displayed on UI. Available for. Model-driven and canvas apps. Parameters. Name, Description, Type ...
Read more >CSS style from app.component.css not getting applied to the ...
In my app.component.css file I changed it to ... root directory ( where the main.ts is ) there's a style.css or style.scss (...
Read more >Different Ways to Write CSS in React
Use CSS Modules · Create a file with .module.css as the extension. · Import that module into the React app (like we saw...
Read more >The State of CSS in Angular
Styling applications is a critical part of delivering great experiences for users. Across the web we have Cascading Style Sheets (CSS) as a ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@nvh95 huh, I guess that is obvious in retrospect 😃, but yeah, we already use a custom render approach, we just historically have not included our
CssBaseline
/CssReset
because they weren’t required for anything that tests needed to assert against. But yeah, we can do that; thanks!@stephenh It’s super helpful. I will take a look in the morning my time. Thank you very much.