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.

Global CSS import

See original GitHub issue

Hi, i just added a top-level global style import like said in doc

styles: ['/assets/css/global.css']

I tried both with /assets/css/global.css putting the file inside static/assets/css and with /global.css putting the css at the catalog root. But nothing seems to work.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
equinusociocommented, Jan 18, 2018

I found a workaround by importing the css inside the catalog/index.js.

import css from "./static/assets/css/global.css";

The way descriped inside the doc it still does not work.

3reactions
jerstuckicommented, Jan 30, 2018

As a workaround, you can do what @equinusocio mentioned in https://github.com/interactivethings/catalog/issues/350#issuecomment-358768490 or add this to the catalog/index.html:

  <link rel="stylesheet" href="%PUBLIC_URL%/global.css">
Read more comments on GitHub >

github_iconTop Results From Across the Web

Basic Features: Built-in CSS Support - Next.js
Next.js allows you to import CSS files from a JavaScript file. This is possible because Next.js extends the concept of import beyond JavaScript....
Read more >
Standard Styling with Global CSS Files - Gatsby
Traditionally, websites are styled using global CSS files. ... Importing CSS files into components; Adding classes to components; Limitations.
Read more >
import - CSS: Cascading Style Sheets - MDN Web Docs
The @import CSS at-rule is used to import style rules from other valid stylesheets. An @import rule must be defined at the top...
Read more >
Global vs. Local Styling In Next.js - Smashing Magazine
The answer is surprisingly simple — to write well-structured CSS that balances global and local styling concerns.
Read more >
RFC: Global CSS Imports #27953 - vercel/next.js - GitHub
It's possible for a dependency to import global CSS, even though this is not valid JavaScript and can't run in the browser or...
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