0

I have asked this question in Foundation forum but no one has been able to answer yet. Once I run "foundation watch" command, all of the variables inside the src/assets/scss/_settings.sccc file are compiled as uncommented.

On the ZURB website however, it states this:

"To change a setting, find the variable you're looking for, uncomment it by removing the slashes (//) at the start of the line, and change the value. Uncommenting signifies that you want the value to change, and also functions as a handy visual aid to see which defaults you're overriding." - http://foundation.zurb.com/sites/docs/sass.html"

I am really confused as what ZURB website says and what compiler does are totally different from each other. Anyone has any ideas?

Thanks...

Yucel-M
  • 27
  • 4
  • please, provide a code snippet. – sobolevn Nov 30 '15 at 08:28
  • You can see the full code here: (http://codepen.io/anon/pen/epqGaB?editors=010 ) They are uncommented! – Yucel-M Nov 30 '15 at 09:12
  • I don't get what's so hard to understand here. The documentation clearly says "To **change** a setting...", it never implies that the variable isn't set with a default value. – cimmanon Nov 30 '15 at 13:56
  • Let me tell you what is confusing here. It says "To change a setting, find the variable you're looking for, uncomment it by removing the slashes (//)" which means they must be commented first in order to uncomment them. However, all variables are already uncommented so there is nothing to uncomment. In another tutorial it says "simply comment the variables you want to exclude" from _settings.scss. This one is more accurate but contradicts with the official documentation. I hope it is clearer now. – Yucel-M Nov 30 '15 at 15:51

1 Answers1

1

This was changed after the initial release of Foundation 6. All settings in the settings file now start out as uncommented. The docs just weren't updated yet to reflect the change.

Foundation Developer's Explanation:

The reason we're uncommenting every variable is to avoid reference errors. For example, let's say you left all the colors the same, so they all have comment marks. Now you try to reference $primary-color farther down, and you get an error, because $primary-color hasn't been defined yet. It is in the settings file, but it's not uncommented. Uncommenting every value gets around this issue.

Source: https://github.com/zurb/foundation-sites/issues/7328#issuecomment-161037445

Colin Marshall
  • 2,142
  • 2
  • 21
  • 31