diff --git a/src/expand.cpp b/src/expand.cpp index 0a40410ed..bb1fab4ba 100644 --- a/src/expand.cpp +++ b/src/expand.cpp @@ -253,7 +253,13 @@ namespace Sass { if (value) value = value->perform(&eval); Block_Obj bb = ab ? operator()(ab) : NULL; if (!bb) { - if (!value || (value->is_invisible() && !d->is_important())) return 0; + if (!value || (value->is_invisible() && !d->is_important())) { + if (d->is_custom_property()) { + error("Custom property values may not be empty.", d->value()->pstate(), traces); + } else { + return nullptr; + } + } } Declaration* decl = SASS_MEMORY_NEW(Declaration, d->pstate(), diff --git a/src/parser.cpp b/src/parser.cpp index 2afd12cc3..a697d20c0 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -1859,7 +1859,7 @@ namespace Sass { css_error("Invalid CSS", " after ", message); } - if (schema->empty()) return {}; + if (schema->empty()) error("Custom property values may not be empty."); return schema.detach(); }