Last active
August 29, 2015 14:21
-
-
Save jakob-e/2cfc6b7de2ce8591cffb to your computer and use it in GitHub Desktop.
Generated by SassMeister.com. http://sassmeister.com/gist/2cfc6b7de2ce8591cffb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ---- | |
| // Sass (v3.4.13) | |
| // Compass (v1.0.3) | |
| // ---- | |
| // | |
| // Namespace Collision Detection | |
| // | |
| @function span(){ /* This is not susy */ } | |
| @function last(){ /* This is not susy */ } | |
| @mixin span(){ /* This is not susy */ } | |
| // === Susy get's imported here === | |
| @mixin _susy-collision-detect { | |
| // | |
| // What needs testing | |
| // Note! alpha will always collide as it is | |
| // now part of core Sass | |
| // | |
| $test-collisions:( | |
| 'span', 'gutter', 'container', 'nested', 'global-box-sizing', 'box-sizing', | |
| 'break', 'nobreak', 'first', 'alpha', 'last', 'omega', 'pre', 'push' | |
| ); | |
| // | |
| // Look for mixins or functions | |
| // | |
| $found-collisions:''; | |
| @for $i from 1 through length($test-collisions){ | |
| $name: nth($test-collisions, $i); | |
| @if mixin-exists($name){ | |
| $found-collisions: $found-collisions + '\A\2022 #{$name} (mixin)'; | |
| } | |
| @if function-exists($name){ | |
| $found-collisions: $found-collisions + '\A\2022 #{$name} (function)'; | |
| } | |
| } | |
| // | |
| // Show warning/throw error | |
| // | |
| @if $found-collisions != '' { | |
| @error('Susy says – we seems to have collisions on the following items:\A#{ $found-collisions }\A\A Please re-map....'); | |
| } | |
| } | |
| @include _susy-collision-detect; | |
| // | |
| // This is not found as it comes after | |
| // | |
| @function first(){ /* This is not susy */ } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Susy says – we seems to have collisions on the following items: | |
| • span (mixin) | |
| • span (function) | |
| • alpha (function) | |
| • last (function) | |
| Please re-map.... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment