Home > Mobile >  Download in one file the CSS code of style.css and its related @import files
Download in one file the CSS code of style.css and its related @import files

Time:09-10

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.

CodePudding user response:

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.

CodePudding user response:

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.

  • Related