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.

Support import external CSS files

See original GitHub issue

Problem

Because Tailwind CSS use Post CSS for their CSS Processor, you can use postcss-import plugin to import external CSS file into your project. To prevent using Post CSS in Windi CSS project, how i can import external CSS into my project?

Example

Example @import syntax from postcss-import plugin:

@import 'swiper/dist/swiper.min.css';

Solution

I think we can create another Windi CSS plugin to handle @import syntax, or we can add @import syntax to a core of directives feature.

Let me know how your opinion about this problem and what the solution can i do.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:8
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
S1SYPHOScommented, Oct 1, 2022

Bumping this as I’d really like to see this feature to include vendor styles, like @lamualfa (swiper) etc …

2reactions
alexanderniebuhrcommented, Feb 23, 2021

Would this work for your use case? If not, what features are u missing?

<script>
import 'assets/external.min.css';
</script>
Read more comments on GitHub >

github_iconTop 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 >
How to add CSS - W3Schools
External CSS. With an external style sheet, you can change the look of an entire website by changing just one file! Each HTML...
Read more >
External CSS Stylesheets – How to Link CSS to HTML and ...
It is considered a best practice to have your CSS stylesheets in an external file. So how can you link that CSS to...
Read more >
css @import external style sheet - Stack Overflow
I'm trying to detect whether it's loaded in Firebug, but it does not appear in the list of css files that are loaded....
Read more >
Importing External Style Sheets in CSS - Tutorialspoint
We can import additional CSS files inside another CSS declaration. The @import rule is used for this purpose as it links a stylesheet...
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