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 Sass Basics (retired) Speeding up Workflow with Sass Importing Files

Hello, in a few instances of this course, the concept of "scoping" is mentioned. Would someone be able to explain this?

I am just curious as to a full definition and also how it works into everyday process/workflow.

1 Answer

Hi Grant,

A variable can be either of global or local scope. A global variable is a variable declared in the main body of the source code, outside all functions, while a local variable is one declared within the body of a function or a block. β€”Wikipedia on Scope (computer science)

Also, see Understanding Variable Scope in Sass.

Hope that helps.