Import CSS File in SCSS with pyScss

pyScss is a Scss compiler for Python. Sometimes we need to include (import) regular CSS file in SCSS file. This post shows how to do it with pyScss:

Assume that we have a css file called pygments.css, we want to include this file in our scss file:

  1. Rename pygments.css to _pygments.scss (Prepend an underscore and switch the extension to scss.)

  2. Use @import directive to include the renamed CSS file in SCSS file:

    @import "pygments";

Tested on: pyScss 1.3.4


[1]sass - Import regular css file in scss file? - Stack Overflow