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 Modular CSS with Sass Getting Modular with Mixins and Functions Colors with Sass Maps

Max Weir
Max Weir
14,963 Points

1 getting an error in compass app

just used the same scss code but get this error.

Ken Alger
Ken Alger
Treehouse Teacher

Max;

Would you please provide more specific information (code you used, etc.) on your question?

Thanks, Ken

3 Answers

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Max;

I am not entirely sure which version of Sass Scout v0.71 supports. I just tried your code on Sassmeister and it didn't have any issues. I personally don't use Scout, but I have heard that there are issues with it and Compass and their interpretation of BEM name conventions as well as maps in various versions of the products.

Ken

Max Weir
Max Weir
14,963 Points

can you recommend any application that can run this? I wanted something I could run locally and test inside my browser as I go. workspaces doesnt do this?

Ken Alger
Ken Alger
Treehouse Teacher

Max;

I am on a Windows machine and have Sass installed. One of the options in Sass is called watch, read more about it, which tells Sass to watch the file/folder and output the CSS every time a change is made and saved to the .scss file(s). It works very well and the descriptive errors come up in the CSS and in the command line. At any rate, that is how I do it when coding. I find myself using the SassMeister site quite a bit to test things to make sure what I am thinking is going to happen actually transpires into what is intended.

Ken

Max Weir
Max Weir
14,963 Points

currently doing: Colors with Sass Maps

I've added the $ui-colors on config.scss but get an error on save, its a copy of what the lesson is too.

Error is:

Change detected at 14:11:59 to: _main.scss error application.scss (Line 42 of _config.scss: Invalid CSS after " default ": expected ")", was ": $fountain-blue,") identical application.css

My line says: $ui-colors: ( default : $fountain-blue, success : $emerald, error : $sunglo, warning : $coral, info : $purple-majesty );

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Max;

The course is Modular CSS with Sass and your post heading would lead me to think you are using Compass. Which version of Compass are you using as Compass versions before, I believe, 1.0.0.alpha.16 do not support Sass Maps. You may try your code over at Sassmeister to see if it compiles successfully there.

If you are using the latest version of everything, can you post your entire CSS code from _config.scss? When doing so please utilize the Markdown Cheatsheet guidelines which are referenced below the text box in which you enter questions, comments, or answers.

Happy coding,

Ken

Max Weir
Max Weir
14,963 Points

thanks, I'm using Scout v0.7.1 for Windows. Would this have the same issue?

This is my scss for the lesson also which outputs an error:

```html .nav { margin-top: em(20px); margin-bottom: em(30px);

&__item {
    display: inline-block;
    margin: 0 em(12px);
}

}'''

```html >>> Change detected at 15:40:27 to: nav.scss error application.scss (Line 9 of _nav.scss: Invalid CSS after " &": expected "{", was "item {" "_item" may only be used at the beginning of a selector.) identical application.css '''