ufocoder / redux-universal-boilerplate

Boilerplate for react universal (isomorphic) application based on flux architecture (redux implementation)
MIT License
72 stars 19 forks source link

how add styles file for <body>? #14

Closed dokenzy closed 7 years ago

dokenzy commented 8 years ago

I am going to add style for with stylus syntax, exactly entire template.

I have created new stylus file in src/server/containers/Html/assets/foo.styl and added import './assets/styles.styl'; in src/server/containers/Html/index.js, edited <body> to <body className="blahblah">.

Rendered HTML is good: but not applied css.

I don't know how to add foo.styl for the index.js file.

Could you show me some code for this?

Thanks.

ufocoder commented 8 years ago

@dokenzy tag <body> is rendered by server bundle and I recommend you to add css classes to your root container of application (it will be common code) and locate styles near of this container also.

dokenzy commented 7 years ago

In my case, <body className="blahblah"> doesn't make any error but I'm following your suggestion. It is coming along nicely. Thanks