CSS not loaded
See original GitHub issueThe CSS is not loaded when using bloomer with next.js. Take a look at this example:
componentes/hero.js
import { ... , Hero, ... } from 'bloomer'
export default () => (
<Hero isSize='medium'>
...
)
layouts/body.js
import Head from '../components/head'
import Header from '../components/header'
import Footer from '../components/footer'
export default ({ children }) =>
<div>
<Head/>
<Header/>
{ children }
<Footer/>
</div>
pages/index.js
import Body from '../layouts/body'
import Hero from '../components/hero'
export default () =>
<Body>
<Hero/>
</Body>
There are no errors in the dev console. The css from <style jsx global> in the Head component is loading properly, only the Bulma css is missing. I have installed bulma with npm. Loading manually with <link href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.5.3/css/bulma.min.css" rel="stylesheet" />
. Any idea what I am missing?
This is the components/head.js
import Head from 'next/head'
export default () =>
<Head>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1" />
<meta charSet="utf-8" />
<style jsx global>{`
body {
background: #000;
color: #181b2b;
}
`}</style>
</Head>
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
HTML not loading CSS file - Stack Overflow
HTML not loading CSS file · Are both files in the same directory? · Which browser are you using? have you already checked...
Read more >How to Troubleshoot CSS Not Working - WPForms
In this tutorial, we'll walk through options to troubleshoot why your CSS is not working and offer possible solutions. Browser Caching.
Read more >Why Is My Site Not Loading the CSS File in 2022? - WPCity.com
A site may not load the CSS file due to browser caching. It's the most common cause and is the easiest to fix...
Read more >How to fix CSS not linking to your HTML document
How to fix CSS not linking to your HTML document · Make sure that you add the rel attribute to the link tag...
Read more >Why is my site not loading the CSS file? - Quora
Normally if your site is not loading css files its because you have not included it either properly or in the right place....
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
For those having a similar issue with the CSS not rendering when using create-react-app, this is the import that fixed it for me:
import 'bulma/css/bulma.css';
Referenced here: https://github.com/jgthms/bulma/issues/388#issue-190008467
@kaspermarstal Could you get this to work?