Skip to content

Commit a39c982

Browse files
committed
added test
1 parent f396bea commit a39c982

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
:root {
2+
--foo: 1px;
3+
}
4+
5+
.bar {
6+
width: var( --foo );
7+
height: var( --foo);
8+
margin-top: var(--foo );
9+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.bar {
2+
width: 1px;
3+
height: 1px;
4+
margin-top: 1px;
5+
}

test/test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ describe('postcss-css-variables', function() {
257257
test('should not mangle outer function parentheses', 'nested-inside-other-func');
258258
});
259259

260+
test('should accept whitespace in var() declarations', 'whitespace-in-var-declaration' )
261+
260262
it('should not parse malformed var() declarations', function() {
261263
return expect(testPlugin(
262264
'./test/fixtures/malformed-variable-usage.css',

0 commit comments

Comments
 (0)