Import CSS file into stylus
See original GitHub issueMaybe I’m missing something in the docs, but is there a way to include a CSS file into a my Stylus project? I have a folder of CSS files from plugins that I use, and I’d rather not edit them so that they are Stylus-compatible every time I update them. I thought @import 'file.css'
would work, but it’s a literal import that I would never want to use.
Thank you!
Issue Analytics
- State:
- Created 11 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
@import and @require | Stylus
Stylus supports both literal @import for CSS, as well as dynamic importing or requiring of other Stylus sheets. Literal CSS #. Any filename...
Read more >import regular css · Issue #448 · stylus/stylus - GitHub
The ability to quickly import vendor .css files (i.e. for a plugin like fancybox) would be helpful and reduce every-day-friction with stylus.
Read more >Make Stylus merge imported CSS into the stylesheet
I have found how to switch this option on: gulp.src('./app/styl/style.styl') .pipe(stylus({ 'include css': true })) .pipe(gulp.dest('.
Read more >5 Importing and Globbing Stylus Files - YouTube
Learn how to use @ import to import .styl files with the Stylus CSS pre-processor.Subscribe to Level Up Pro for extra ...
Read more >Languages: Stylus - CodeKit
Include CSS Imports. When enabled, the contents of a CSS file that you @import in your Stylus file will replace the import statement...
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
@jonathanong have you tried the
--include-css
cli option? I think it does exactly what you need — includes the content of the.css
files as is.@kalisjoshua
-r, --resolve-url
flag to resolve the urls relative to the stylus file.However, I agree that it could be useful to have the same things those keys do, but as bifs — so you could choose what to inline and how to resolve urls per import.