Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

@import file doesn't work. Deprecated?

Hi there,

I'm trying to finish the first stage of the Compass Extension course.

I'm seting up the mixins for the extension at the moment but I need to set up an @import directive to get it to work.

but if I do this;
@import "compass/css3/shared";

I get the following returned from the compiler.

Error: File to import not found or unreadable: compass/css3/shared. Load paths:
on line 3 of _flexy.scss

My first try to fix this was to copy files over from the Compass Extension template into my extension project and then try again.

Same response.

My thinking at this point as that the shared utilities import directive is deprecated.

So I looked around in the Sass documentation for some flexbox imports that might work. And I tried to use this import directive instead.

@import "compass/css3/flexbox";

It seems to be still valid but I tried again with no luck. Error: File to import not found or unreadable: compass/css3/flexbox. Load paths: on line 3 of _flexy.scss

Can anyone point me in the direction of where I may be going wrong because I'm a little lost. :)

1 Answer

Hi,

You should only have to use compass/css3 to take advantage of the entire Compass CSS3 module.

@import "compass/css3"

You might also try moving the import out of your partial _flexy.scss file and into your main .scss file instead. With Sass I generally have a main Sass file, something like main.scss where I handle all the importing of my partials and Compass modules.

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,253 Points

Thanks for your reply mikes.

This was just me following Guil's video to the letter so I went with the original module but i was none the wiser as to the correct modile to use.

I'm sure once I'm more familiar with a Sass workflow I'll be using more partials but for now I'm learning Guil's way for this course.

Will let you know how it goes. :)

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,253 Points

No that module just isn't working. Not sure what else to do... :)