Skip to content

Instantly share code, notes, and snippets.

@jakob-e
Last active August 29, 2015 14:21
Show Gist options
  • Save jakob-e/2cfc6b7de2ce8591cffb to your computer and use it in GitHub Desktop.
Save jakob-e/2cfc6b7de2ce8591cffb to your computer and use it in GitHub Desktop.
Generated by SassMeister.com. http://sassmeister.com/gist/2cfc6b7de2ce8591cffb
// ----
// 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 */ }
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