Add ignore next warning control comment
This commit is contained in:
1 parent
b3dc3ffd6c
commit
d484431a9c
5 files changed
+130
-3
No files matched your search
@@ -447,6 +447,21 @@ test('uses ignore next control comments', () => {
|
||||
check('ignore-next')
|
||||
})
|
||||
|
||||
test('uses ignore next warning control comments', () => {
|
||||
let input = read('ignore-next-warning')
|
||||
let output = read('ignore-next-warning.out')
|
||||
let result = postcss([prefixer('grid')]).process(input)
|
||||
|
||||
equal(result.css, output)
|
||||
equal(
|
||||
result.warnings().map(i => i.toString()),
|
||||
[
|
||||
'autoprefixer: <css input>:33:3: Gradient has outdated direction ' +
|
||||
'syntax. New syntax is like `to left` instead of `right`.'
|
||||
]
|
||||
)
|
||||
})
|
||||
|
||||
test('uses block control comments', () => {
|
||||
check('disabled')
|
||||
})
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
.grid {
|
||||
grid-gap: 1px;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
grid-template-rows: repeat(3, 1fr);
|
||||
/* autoprefixer: ignore next warning */
|
||||
grid-template-areas:
|
||||
'left top-void right'
|
||||
'left center right'
|
||||
'left bottom-void right';
|
||||
}
|
||||
|
||||
.grid-left {
|
||||
grid-area: left;
|
||||
}
|
||||
|
||||
.grid-center {
|
||||
grid-area: center;
|
||||
}
|
||||
|
||||
.grid-right {
|
||||
grid-area: right;
|
||||
}
|
||||
|
||||
.named {
|
||||
grid-template-rows: 1fr;
|
||||
/* autoprefixer: ignore next warning */
|
||||
grid-template-columns: [content] 1fr;
|
||||
}
|
||||
|
||||
.gradient {
|
||||
/* autoprefixer: ignore next warning */
|
||||
background: linear-gradient(top, white, black);
|
||||
mask: linear-gradient(top, white, black);
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
.grid {
|
||||
grid-gap: 1px;
|
||||
-ms-grid-columns: 1fr 1px 1fr 1px 1fr;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
-ms-grid-rows: 1fr 1px 1fr 1px 1fr;
|
||||
grid-template-rows: repeat(3, 1fr);
|
||||
/* autoprefixer: ignore next warning */
|
||||
grid-template-areas:
|
||||
'left top-void right'
|
||||
'left center right'
|
||||
'left bottom-void right';
|
||||
}
|
||||
|
||||
.grid-left {
|
||||
-ms-grid-row: 1;
|
||||
-ms-grid-row-span: 5;
|
||||
-ms-grid-column: 1;
|
||||
grid-area: left;
|
||||
}
|
||||
|
||||
.grid-center {
|
||||
-ms-grid-row: 3;
|
||||
-ms-grid-column: 3;
|
||||
grid-area: center;
|
||||
}
|
||||
|
||||
.grid-right {
|
||||
-ms-grid-row: 1;
|
||||
-ms-grid-row-span: 5;
|
||||
-ms-grid-column: 5;
|
||||
grid-area: right;
|
||||
}
|
||||
|
||||
.named {
|
||||
-ms-grid-rows: 1fr;
|
||||
grid-template-rows: 1fr;
|
||||
/* autoprefixer: ignore next warning */
|
||||
-ms-grid-columns: [content] 1fr;
|
||||
grid-template-columns: [content] 1fr;
|
||||
}
|
||||
|
||||
.named > *:nth-child(1) {
|
||||
-ms-grid-row: 1;
|
||||
-ms-grid-column: 1;
|
||||
}
|
||||
|
||||
.named > *:nth-child(2) {
|
||||
-ms-grid-row: 1;
|
||||
-ms-grid-column: 2;
|
||||
}
|
||||
|
||||
.gradient {
|
||||
/* autoprefixer: ignore next warning */
|
||||
background: -webkit-linear-gradient(top, white, black);
|
||||
background: linear-gradient(top, white, black);
|
||||
-webkit-mask: -webkit-linear-gradient(top, white, black);
|
||||
mask: linear-gradient(top, white, black);
|
||||
}
|
||||
Reference in new issue
Block a user