Skip to content

@import CSS from SCSS #8570

@davejacobs

Description

@davejacobs

(Note: #6903 was filed for this issue in 2018, but it was locked & closed due to inactivity.)

My Environment

Software Version(s)
Operating System macOS Big Sur
jekyll Latest
github-pages N/A

Expected Behaviour

I have a CSS file—tailwindcss/base.css—that I'd like to import from SCSS. This is allowed per the SCSS spec and is a common pattern, particularly when interacting with node modules that provide pre-compiled CSS. This behavior is also supported by sassc.

The following command is expected to import the CSS file and compile it into one final file.

@import "tailwindcss/base";

Current Behavior

Attempting to compile this file using jekyll serve fails:

Error: File to import not found or unreadable: tailwindcss/base. (SassC::SyntaxError)

All other files on the load path can be imported, but CSS from node_modules appears to fail.

This error is not present when I compile the file directly with sassc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions