skip to Main Content

In WordPress, my main style.css file imports various sub-files, such as content.css, archive.css, product.css and so on:

@import url("content.css");
@import url("archive.css");
@import url("product.css");

Without success have I have been looking for a way – through browser console or online resource – to download "in a shot" a single CSS containing style.css plus all related @import files, without having to copy and paste all of them in a new file.

Do you know if there is a solution for this? Thank you.

2

Answers


  1. You could use a CSS pre-processor such as LESS or Sass (SCSS), they come with many other features as well.

    Depending on the editor you already use you might be able so simply install a package (like Easy LESS for Visual Studio Code), rename your style.css to style.less and be done.

    Choosing and switching to a CSS pre-processor might however, depending on your circumstances, environment and experience, not be easy or straightforward at all.

    Login or Signup to reply.
  2. I’d suggest just to copy paste them your css files into one. Using a tool for a simple task as this one can only result in bugs.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search