mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-03 08:19:37 +08:00
672ebecf47
* deps: upgrade dependencies * fix: backward compatibility * fix: replace cross with close
18 lines
470 B
TypeScript
18 lines
470 B
TypeScript
import './index.less';
|
|
|
|
function isFlexSupported(style) {
|
|
return 'flex' in style ||
|
|
'webkitFlex' in style ||
|
|
'MozFlex' in style;
|
|
}
|
|
|
|
if (typeof window !== undefined && window.document && window.document.documentElement) {
|
|
const { documentElement } = window.document;
|
|
const NO_FLEX = 'no-flex';
|
|
|
|
if (!isFlexSupported(documentElement.style) &&
|
|
documentElement.className.indexOf(NO_FLEX) === -1) {
|
|
documentElement.className += ` ${NO_FLEX}`;
|
|
}
|
|
}
|