Skip to content

Commit

Permalink
Remove end→flex-end warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Mar 20, 2024
1 parent 5f6f362 commit fe7bae4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
16 changes: 0 additions & 16 deletions lib/processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,6 @@ class Processor {
return displayGrid || gridTemplate || gridGap
})
}
function insideFlex(decl) {
return decl.parent.some(node => {
return node.prop === 'display' && /(inline-)?flex/.test(node.value)
})
}

let gridPrefixes =
this.gridStatus(css, result) &&
Expand Down Expand Up @@ -147,17 +142,6 @@ class Processor {
{ node: decl }
)
}
} else if (
/^(align|justify|place)-(items|content)$/.test(prop) &&
insideFlex(decl)
) {
if (value === 'start' || value === 'end') {
result.warn(
`${value} value has mixed support, consider using ` +
`flex-${value} instead`,
{ node: decl }
)
}
} else if (prop === 'text-decoration-skip' && value === 'ink') {
result.warn(
'Replace text-decoration-skip: ink to ' +
Expand Down
19 changes: 0 additions & 19 deletions test/autoprefixer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -903,25 +903,6 @@ test('warns on old flexbox display', () => {
)
})

test('warns on mixed support usage', () => {
let css = 'a { display: flex; align-content: start; justify-content: end; }'
let result = postcss([
autoprefixer({
overrideBrowserslist: ['IE 11']
})
]).process(css)
equal(result.css, css)
equal(
result.warnings().map(i => i.toString()),
[
'autoprefixer: <css input>:1:20: start value has mixed support, ' +
'consider using flex-start instead',
'autoprefixer: <css input>:1:42: end value has mixed support, ' +
'consider using flex-end instead'
]
)
})

test('supports intrinsic sizing', () => {
let input = read('intrinsic')
let output = read('intrinsic.out')
Expand Down

0 comments on commit fe7bae4

Please sign in to comment.