question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The 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:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
sandalsoftcommented, May 31, 2018

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

0reactions
srikrsnacommented, Jul 4, 2018

@kaspermarstal Could you get this to work?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found