Skip to content

Commit

Permalink
Added more tests of css custom variables case sensitivity. #648
Browse files Browse the repository at this point in the history
  • Loading branch information
P-a committed Oct 27, 2018
1 parent 4d0faf6 commit 08817ef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/postcss-merge-longhand/src/__tests__/boxBase.js
Expand Up @@ -117,6 +117,10 @@ addTests({
message: 'should not explode box props with custom properties',
fixture: 'h1{box-bottom:var(--variable)}',
expected: 'h1{box-bottom:var(--variable)}',
}, {
message: 'should preserve case of custom properties',
fixture: 'h1{box-top:10px;box-right:var(--fooBar);box-right:15px;box-bottom:var(--fooBar);box-bottom:20px;box-left:25px;box-top:var(--fooBar);box-left:var(--fooBar)}',
expected: 'h1{box:10px 15px 20px 25px;box-top:var(--fooBar);box-left:var(--fooBar)}',
}, {
message: 'should not merge incomplete box props where one has an unset property',
fixture: 'h1{box-bottom:10px;box-top:unset;box-left:20px}',
Expand Down
7 changes: 7 additions & 0 deletions packages/postcss-merge-longhand/src/__tests__/columns.js
Expand Up @@ -82,3 +82,10 @@ test(
passthroughCSS,
'h1{columns:var(--variable)}',
);

test(
'should preserve case of custom properties',
passthroughCSS,
'h1{columns:var(--fooBar)}',
);

0 comments on commit 08817ef

Please sign in to comment.