Is it possible to create a local/private sass mixin?
css, sass
Solution
You are right. Just as in a typical CSS file, your sass project is compiled top down. So a mixin sharing the same name as a previous one will overwrite it. If you wish to use the original mixin in c.scss you would have to redefine it.
Problem
I have three sass files: a.scss, b.scss, c.scss a.scss: ``` @mixin font($size, $color){ font-size: #{$size}; color: #{$color} } p{ @include font(10px, blue) } ``` b.scss: ``` @mixin font() { .. } ``` c.scss ``` @import a.scss @import b.scss ``` I think the mixin font() in b.scss override the mixin font($size, $color) in a.scss. ``` p{ @include font(10px, blue) // use mixin font() in b.scss, error } ``` Is it possible to create a local/private sass mixin? Or all mixins in sass are global, I have to give them unique name for each mixin?