Skip to content

Instantly share code, notes, and snippets.

@kizu
Last active October 26, 2016 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kizu/b858218ff715b9b493ab4b93de89ec4b to your computer and use it in GitHub Desktop.
Save kizu/b858218ff715b9b493ab4b93de89ec4b to your computer and use it in GitHub Desktop.
Testing empty values
/* Testing empty values */
.test:before { content: attr(class); }
.test {
border: var(--bar) solid;
}
.test_valid {
--bar: ;
}
.test_invalid {
--bar:;
}
.test_defined {
--bar: 10px;
}
.test_fallback_valid {
--bar: var(--foo, )
}
.test_fallback_invalid {
--bar: var(--foo,)
}
<p class="test test_notDeclared"></p>
<p class="test test_invalid"></p>
<p class="test test_valid"></p>
<p class="test test_valid test_defined"></p>
<p class="test test_fallback_valid"></p>
<p class="test test_fallback_invalid"></p>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment