Feature Request: inline import of css files
See original GitHub issueIt would be nice to have the ability import a .css file line (like .styl files are) rather than treating @import 'somefile.css'
as literal CSS. Using --import-css
is not a good solution as it affects all @import
statements.
It seems like the most robust way to fix this would be for @import
to resolve .css files in addition to .styl files. So if I specified @import 'normalize'
and normalize.css
exists (and normalize.styl
does not), normalize.css
would be imported inline.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:13
- Comments:24 (1 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 >[Feature Request] Process/include inline CSS in index.html
It would be great if we had a feature that allows us to import CSS files right in the index.html, so the CSS...
Read more >Best way to include CSS? Why use @import? - Stack Overflow
From a page speed standpoint, @import from a CSS file should almost never be used, as it can prevent stylesheets from being downloaded...
Read more >CSS @import Rule - W3Schools
Import the "navigation.css" style sheet into the current style sheet: @import "navigation. · Import the "printstyle.css" style sheet ONLY if the media is...
Read more >Basic Features: Built-in CSS Support - Next.js
In production, all CSS files will be automatically concatenated into a single minified .css file. Import styles from node_modules. Since Next.js 9.5.4, ...
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 Free
Top 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
Bump
Hey all. I seem to run into this issue quite frequently, so I wrote a small plugin to implement
@require "file.css"
as mentioned by some here. Feedback is always welcome! I’ve posted the repo on my github: https://github.com/khalidhoffman/stylus-require-css-evaluator