How to import css correctly?
See original GitHub issueI import the css using following code:
import 'inspire-tree/dist/inspire-tree.css';
but some errors occured because it can’t find the images. So how to import css correctly?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
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 >CSS @import Rule - W3Schools
The @import rule allows you to import a style sheet into another style sheet. The @import rule must be at the top of...
Read more >Best way to include CSS? Why use @import? - Stack Overflow
The following are all correct ways to use @import @import url("fineprint.css") print; @import url("bluish.css") projection, tv; @import 'custom.css'; ...
Read more >Using @import To Call Your CSS Files | Cascading Style Sheets
The easier way to apply multiple files is to use the "@import" rule (browser support dependant). In our example we import "main.css" which...
Read more >External CSS Stylesheets – How to Link CSS to HTML and ...
If the CSS file and the HTML file are in different folders, you need to write the correct path that needs to go...
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
I’m not sure that I’ve tested importing the compiled css into another webpack project but I don’t see any reason it wouldn’t work. It likely depends on how you’ve setup webpack. Our CSS is not distributed inline (with any js), it’s a separate css file with only one external GIF.
I have bundled the source SCSS in other webpack projects though, so I can say for sure that works, just needs something to compile it.
@viveleroi ok, great thanks. I fixed it by adding a loader for GIF. thank you.