ctrlplusb / react-universally

A starter kit for universal react applications.
MIT License
1.7k stars 244 forks source link

Internal Styles #518

Open sergiokopplin opened 6 years ago

sergiokopplin commented 6 years ago

Is there a way to use Internal CSS? I din't find any info from docs or from issues. My first try was looking into assets.json, but we have just js there. Important, i'm not using styled components. cc @oyeanuj.


e.g.


<head>
...
<style>
.hashClass { border: 1px solid #ccc; }
</style
...
</head>
```.
mschipperheyn commented 6 years ago

You can use e.g. css-loader to import a global styles class

`import './global.css'

and then include "per class" css files to implement local styles

`import styles as './myComponent.css''

There is also the option to use jss-in-css or styled components