手写笔如何处理变量范围?
--
1-所有变量都是全局的吗?
$foo = red // is $foo global?
2-与commonJS 模块类似,是否有任何exports
/require
等价物?
$foo = @import 'foo'
body { color: $foo }
3-在 CSS 块中声明的变量怎么样,可能使用 mixins:
$foo = green
bar()
$foo = yellow // is it the same $foo ?
$baz = blue. // local or implied global?
ul {
background: $foo // green or yellow? red?
$foo = red
li {
$foo = pink
}
color: $foo // pink?
bar() // what about $foo now?
}
--
将不胜感激有关此的任何澄清或文件...
谢谢