@import "archetype"; // this should throw a warning because we can't retrieve the key-value pairs for the top level @if not styleguide-component-exists(test-missing-nil, $CONFIG_THEME) { $a-blackhole: styleguide-add-component(test-missing-nil, (), ( (default, ( color red, nil )) // missing nil ), $CONFIG_THEME); } // this should still throw a warning because we can't retrieve the key-value pairs for the properties @if not styleguide-component-exists(test-missing-nil-2, $CONFIG_THEME) { $a-blackhole: styleguide-add-component(test-missing-nil-2, (), ( (default, ( color yellow // missing nil )), nil ), $CONFIG_THEME); } // this should still throw a warning because we can't retrieve the key-value pairs for the properties @if not styleguide-component-exists(test-missing-comma, $CONFIG_THEME) { $a-blackhole: styleguide-add-component(test-missing-nil-3, (), ( (default, ( color blue, (states, ( (hover, ( color black, background green, font-weight bold )) )) )), nil ), $CONFIG_THEME); } // this should throw a warning because we probably forgot a comma somewhere @if not styleguide-component-exists(test-missing-comma, $CONFIG_THEME) { $a-blackhole: styleguide-add-component(test-missing-comma, (), ( (default, ( color white, background green // missing comma (states, ( (hover, ( color black, background green, font-weight bold )), nil )) )), nil ), $CONFIG_THEME); } // this should throw a warning because we used an empty value for a property @if not styleguide-component-exists(test-empty-value, $CONFIG_THEME) { $a-blackhole: styleguide-add-component(test-empty-value, (), ( (default, ( color // this is ambiguous, but shouldn't cause an error )), nil ), $CONFIG_THEME); } .test-missing-nil { @include styleguide(test-missing-nil); } .test-missing-nil-2 { @include styleguide(test-missing-nil-2); } .test-missing-nil-3 { @include styleguide(test-missing-nil-3); } .test-missing-comma { @include styleguide(test-missing-comma); } .test-empty-value { @include styleguide(test-empty-value); }