Skip to content

add a few abstract tests with various configs #775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions plugins/postcss-logical/.tape.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,35 @@ import postcssTape from '../../packages/postcss-tape/dist/index.mjs';
import plugin from 'postcss-logical';

postcssTape(plugin)({
'abstract': {
message: 'abstract test with default setting',
},
'abstract:rtl': {
message: 'abstract test with rtl',
options: {
inlineDirection: 'right-to-left'
},
},
'abstract:bt': {
message: 'abstract test with bt',
options: {
blockDirection: 'bottom-to-top'
},
},
'abstract:rtl-and-bt': {
message: 'abstract test with rtl and bt',
options: {
blockDirection: 'bottom-to-top',
inlineDirection: 'right-to-left'
},
},
'abstract:chinese': {
message: 'abstract test with rtl and bt',
options: {
blockDirection: 'right-to-left',
inlineDirection: 'top-to-bottom'
},
},
'caption-side': {
message: 'supports logical "caption-side" properties',
},
Expand Down
11 changes: 11 additions & 0 deletions plugins/postcss-logical/test/abstract.bt.expect.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.abstract {
margin-bottom: block-start;
margin-right: inline-end;
margin-top: block-end;
margin-left: inline-start;
}

.abstract {
float: left;
clear: right;
}
11 changes: 11 additions & 0 deletions plugins/postcss-logical/test/abstract.chinese.expect.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.abstract {
margin-right: block-start;
margin-bottom: inline-end;
margin-left: block-end;
margin-top: inline-start;
}

.abstract {
float: inline-start;
clear: inline-end;
}
11 changes: 11 additions & 0 deletions plugins/postcss-logical/test/abstract.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.abstract {
margin-block-start: block-start;
margin-inline-end: inline-end;
margin-block-end: block-end;
margin-inline-start: inline-start;
}

.abstract {
float: inline-start;
clear: inline-end;
}
11 changes: 11 additions & 0 deletions plugins/postcss-logical/test/abstract.expect.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.abstract {
margin-top: block-start;
margin-right: inline-end;
margin-bottom: block-end;
margin-left: inline-start;
}

.abstract {
float: left;
clear: right;
}
11 changes: 11 additions & 0 deletions plugins/postcss-logical/test/abstract.rtl-and-bt.expect.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.abstract {
margin-bottom: block-start;
margin-left: inline-end;
margin-top: block-end;
margin-right: inline-start;
}

.abstract {
float: right;
clear: left;
}
11 changes: 11 additions & 0 deletions plugins/postcss-logical/test/abstract.rtl.expect.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.abstract {
margin-top: block-start;
margin-left: inline-end;
margin-bottom: block-end;
margin-right: inline-start;
}

.abstract {
float: right;
clear: left;
}